diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 41e37196757c41..e572827bac80d2 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 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..1eddaec04a8667 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,13 +110,6 @@ 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. # 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-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-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..a4f7eb931f1386 100644 --- a/.github/workflows/recent_fail_summary.yaml +++ b/.github/workflows/recent_fail_summary.yaml @@ -26,14 +26,20 @@ 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 + recent_fails_logs + retention-days: 5 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0be17862507fa0..2571c6410d4432 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -196,21 +196,6 @@ jobs: build \ --copy-artifacts-to objdir-clone \ " - - name: Run Tests - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ - run \ - --iterations 1 \ - --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 the python parser sending commands to chip-tool # https://github.com/project-chip/connectedhomeip/issues/27673 @@ -335,23 +320,6 @@ jobs: build \ --copy-artifacts-to objdir-clone \ " - - name: Run Tests - if: matrix.build_variant != 'no-ble-tsan-clang' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py \ - --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 \ - --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: Run Tests using the python parser sending commands to chip-tool # https://github.com/project-chip/connectedhomeip/issues/27673 @@ -431,6 +399,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 +418,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 +440,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..f9050a0595cd6a 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,8 @@ 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 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/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/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 8dc09e91131be2..2f8655b81130ee 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 $) 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..d613993afff206 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -12,6 +12,11 @@ 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 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/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/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/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..e38e25ea76d399 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": 97, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -2671,7 +2697,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2687,7 +2713,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2703,7 +2729,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2719,7 +2745,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5509,7 +5535,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + }, + "deviceTypes": [ + { + "id": 46, + "code": 44, + "profileId": 259, + "label": "MA-air-quality-sensor", + "name": "MA-air-quality-sensor" + } + ], + "deviceTypeRefs": [ + 46 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 44 + ], "deviceTypeName": "MA-air-quality-sensor", "deviceTypeCode": 44, "deviceTypeProfileId": 259, @@ -9541,18 +9593,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": [] 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 451331ead17cee..8ed04348a47f3c 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 { @@ -6090,12 +6135,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 { @@ -6183,7 +6229,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; } @@ -6197,6 +6243,12 @@ endpoint 0 { 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; @@ -6588,12 +6640,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 { @@ -6693,6 +6746,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; @@ -6752,7 +6818,7 @@ endpoint 1 { } server cluster AirQuality { - ram attribute airQuality default = 0; + callback attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -6988,7 +7054,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 { @@ -7005,7 +7071,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 { @@ -7070,7 +7136,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 { @@ -7149,17 +7215,17 @@ 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; @@ -7168,17 +7234,17 @@ endpoint 1 { } 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; @@ -7187,17 +7253,17 @@ endpoint 1 { } 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; @@ -7206,17 +7272,17 @@ endpoint 1 { } 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; @@ -7225,17 +7291,17 @@ endpoint 1 { } 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; @@ -7244,17 +7310,17 @@ endpoint 1 { } 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; @@ -7263,17 +7329,17 @@ endpoint 1 { } 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; @@ -7282,17 +7348,17 @@ endpoint 1 { } 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; @@ -7301,17 +7367,17 @@ endpoint 1 { } 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; @@ -7320,17 +7386,17 @@ endpoint 1 { } 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; @@ -7587,12 +7653,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 { @@ -7629,7 +7696,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 f6115a8eee56fe..071729a8462b69 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 @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,14 +23,20 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ { - "id": 11, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,14 +44,14 @@ }, "deviceTypes": [ { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 55, + "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -59,8 +59,8 @@ } ], "deviceTypeRefs": [ - 56, - 55 + 3, + 2 ], "deviceVersions": [ 1, @@ -948,8 +948,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, - "storageOption": "RAM", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -965,7 +965,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -981,7 +981,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -997,7 +997,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1013,7 +1013,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1048,7 +1048,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1277,7 +1277,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1293,7 +1293,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1309,7 +1309,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1325,7 +1325,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1777,7 +1777,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1793,7 +1793,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1809,7 +1809,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1825,7 +1825,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -2289,7 +2289,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2305,7 +2305,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2321,7 +2321,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2337,7 +2337,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2517,7 +2517,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2552,7 +2552,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2649,7 +2649,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2665,7 +2665,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2681,7 +2681,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2697,7 +2697,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2754,7 +2754,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "Sources", @@ -3407,7 +3407,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3655,7 +3655,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3671,7 +3671,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3687,7 +3687,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3703,7 +3703,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4007,7 +4007,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4023,7 +4023,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4039,7 +4039,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4209,16 +4209,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", @@ -4403,7 +4393,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6918,7 +6908,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6934,7 +6924,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6950,7 +6940,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6966,7 +6956,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7262,7 +7252,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7278,7 +7268,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7294,7 +7284,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7310,7 +7300,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7526,7 +7516,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7542,7 +7532,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7558,7 +7548,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7574,7 +7564,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8653,7 +8643,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9479,7 +9469,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10512,10 +10502,10 @@ ] }, { - "id": 8, + "id": 4, "name": "MA-onofflight", "deviceTypeRef": { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -10523,14 +10513,14 @@ }, "deviceTypes": [ { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -10538,8 +10528,8 @@ } ], "deviceTypeRefs": [ - 61, - 56 + 8, + 3 ], "deviceVersions": [ 1, @@ -10660,7 +10650,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10676,7 +10666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10692,7 +10682,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10708,7 +10698,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10908,7 +10898,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10924,7 +10914,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10940,7 +10930,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10956,7 +10946,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11292,7 +11282,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11308,7 +11298,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11324,7 +11314,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11340,7 +11330,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11602,7 +11592,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12403,8 +12393,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, - "storageOption": "RAM", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12420,7 +12410,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12436,7 +12426,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12452,7 +12442,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12468,7 +12458,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12503,7 +12493,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -13864,7 +13854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15485,6 +15475,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, @@ -16655,7 +16857,7 @@ "side": "server", "type": "AirQualityEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -21016,7 +21218,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -21316,7 +21518,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21612,7 +21814,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22486,7 +22688,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23731,7 +23933,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "401", @@ -23747,7 +23949,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "50", @@ -23763,7 +23965,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1500", @@ -23779,7 +23981,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "511", @@ -23795,7 +23997,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23811,7 +24013,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "213", @@ -23827,7 +24029,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -23843,7 +24045,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -23859,7 +24061,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -23875,7 +24077,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -23891,7 +24093,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24055,7 +24257,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "458", @@ -24071,7 +24273,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -24087,7 +24289,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2000", @@ -24103,7 +24305,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "523", @@ -24119,7 +24321,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24135,7 +24337,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "421", @@ -24151,7 +24353,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24167,7 +24369,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -24183,7 +24385,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24199,7 +24401,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24215,7 +24417,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24379,7 +24581,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24395,7 +24597,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24411,7 +24613,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "150", @@ -24427,7 +24629,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24443,7 +24645,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "120", @@ -24459,7 +24661,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24475,7 +24677,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "120", @@ -24491,7 +24693,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24507,7 +24709,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24523,7 +24725,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24539,7 +24741,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -24703,7 +24905,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -24719,7 +24921,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -24735,7 +24937,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -24751,7 +24953,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "50", @@ -24767,7 +24969,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24783,7 +24985,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "20", @@ -24799,7 +25001,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -24815,7 +25017,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24831,7 +25033,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24847,7 +25049,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -24863,7 +25065,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -25027,7 +25229,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "42", @@ -25043,7 +25245,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -25059,7 +25261,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -25075,7 +25277,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "90", @@ -25091,7 +25293,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25107,7 +25309,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "35", @@ -25123,7 +25325,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25139,7 +25341,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -25155,7 +25357,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -25171,7 +25373,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25187,7 +25389,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -25351,7 +25553,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -25367,7 +25569,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25383,7 +25585,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "200", @@ -25399,7 +25601,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -25415,7 +25617,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7200", @@ -25431,7 +25633,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -25447,7 +25649,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7200", @@ -25463,7 +25665,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25479,7 +25681,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -25495,7 +25697,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25511,7 +25713,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -25675,7 +25877,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "39", @@ -25691,7 +25893,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -25707,7 +25909,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -25723,7 +25925,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "70", @@ -25739,7 +25941,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25755,7 +25957,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "41", @@ -25771,7 +25973,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -25787,7 +25989,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -25803,7 +26005,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -25819,7 +26021,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -25835,7 +26037,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -25999,7 +26201,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "7", @@ -26015,7 +26217,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -26031,7 +26233,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "400", @@ -26047,7 +26249,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "49", @@ -26063,7 +26265,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26079,7 +26281,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "43", @@ -26095,7 +26297,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26111,7 +26313,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -26127,7 +26329,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "4", @@ -26143,7 +26345,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -26159,7 +26361,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -26323,7 +26525,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -26339,7 +26541,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -26355,7 +26557,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -26371,7 +26573,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "8", @@ -26387,7 +26589,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26403,7 +26605,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "2", @@ -26419,7 +26621,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26435,7 +26637,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -26451,7 +26653,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -26467,7 +26669,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -26483,7 +26685,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -26647,7 +26849,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "10", @@ -26663,7 +26865,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "5", @@ -26679,7 +26881,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -26695,7 +26897,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "36", @@ -26711,7 +26913,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26727,7 +26929,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "20", @@ -26743,7 +26945,7 @@ "side": "server", "type": "elapsed_s", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3600", @@ -26759,7 +26961,7 @@ "side": "server", "type": "single", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -26775,7 +26977,7 @@ "side": "server", "type": "MeasurementUnitEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -26791,7 +26993,7 @@ "side": "server", "type": "MeasurementMediumEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -26807,7 +27009,7 @@ "side": "server", "type": "LevelValueEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -30401,10 +30603,10 @@ ] }, { - "id": 9, + "id": 3, "name": "MA-onofflight", "deviceTypeRef": { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -30412,14 +30614,14 @@ }, "deviceTypes": [ { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -30427,8 +30629,8 @@ } ], "deviceTypeRefs": [ - 61, - 56 + 8, + 3 ], "deviceVersions": [ 1, @@ -30549,7 +30751,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30565,7 +30767,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30581,7 +30783,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30597,7 +30799,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30797,7 +30999,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30813,7 +31015,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30829,7 +31031,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -30845,7 +31047,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31165,7 +31367,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31181,7 +31383,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31197,7 +31399,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31213,7 +31415,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31229,7 +31431,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31459,7 +31661,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31475,7 +31677,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31491,7 +31693,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31507,7 +31709,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31852,8 +32054,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, - "storageOption": "RAM", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31869,7 +32071,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31885,7 +32087,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31901,7 +32103,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31917,7 +32119,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -31952,7 +32154,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -32933,7 +33135,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -33616,7 +33818,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -34442,7 +34644,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -34685,10 +34887,10 @@ ] }, { - "id": 10, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 106, + "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -34696,7 +34898,7 @@ }, "deviceTypes": [ { - "id": 106, + "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -34704,7 +34906,7 @@ } ], "deviceTypeRefs": [ - 106 + 53 ], "deviceVersions": [ 1 @@ -34840,7 +35042,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -35218,4 +35420,4 @@ } ], "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..eb2b7c89288da4 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/air-quality-instance.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace AirQuality { + +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/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..eb5f4dc5607dc3 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp @@ -0,0 +1,25 @@ +#include + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AirQuality; + +Instance * gAirQualityCluster = nullptr; + +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.Raw()); + 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 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..82423baf24f607 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -154,6 +154,7 @@ 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/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/smco-stub.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index f4c34a8a1295f9..aa67f8cd72042f 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -72,6 +72,7 @@ asr_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/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/smco-stub.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..34ba1c1d3e72c9 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -77,6 +77,7 @@ ti_simplelink_executable("all-clusters-app") { sources = [ "${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/smco-stub.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..c8d6f5a21acd5d 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -77,6 +77,7 @@ ti_simplelink_executable("all-clusters-app") { sources = [ "${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/smco-stub.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/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..61ce1a58961802 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -108,6 +108,7 @@ psoc6_executable("clusters_app") { sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/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/smco-stub.cpp", diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index e3118377d51772..19c8635a6b665e 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -21,11 +21,16 @@ #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 +147,23 @@ 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 { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); @@ -286,6 +308,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 +365,55 @@ 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 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..20b2ab731b75d3 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -88,6 +88,11 @@ 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); }; class AllClustersCommandDelegate : public NamedPipeCommandDelegate diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 457f911debc9b0..a3ecb76807fa3e 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -21,8 +21,10 @@ 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", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 3f0c5071b13de1..b3c942dfe09da3 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -18,6 +18,7 @@ #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" @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +60,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 +213,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() @@ -196,6 +228,7 @@ void ApplicationShutdown() Clusters::RvcRunMode::Shutdown(); Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Shutdown(); + Clusters::AirQuality::Shutdown(); Clusters::OperationalState::Shutdown(); Clusters::RvcOperationalState::Shutdown(); @@ -208,7 +241,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..0424e3a6484e38 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -60,6 +60,7 @@ 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/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 6fb66644ad1f50..9593bb7232c9a2 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -63,6 +63,7 @@ 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/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 4b837e04a01551..7f9b4f87b74eea 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -178,6 +178,15 @@ 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. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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..f00d4d597c6087 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -75,6 +75,7 @@ mw320_executable("shell_mw320") { ] sources = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/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/smco-stub.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..eb9e3faa8688c3 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -54,6 +54,7 @@ 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/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 723e47008c8ac5..d3165fb7500d3d 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -76,6 +76,7 @@ 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/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 8bf7f00152148f..5b4d63336949b7 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -25,6 +25,7 @@ source_set("chip-all-clusters-common") { sources = [ "${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/smco-stub.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 31bc69602a190d..d7c370d760f689 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 @@ -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 { @@ -907,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; @@ -4505,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 { 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 0fa29974d490dc..604607cd491c93 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 @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 12, + "id": 2, "name": "MA-rootdevice", "deviceTypeRef": { "id": 3, @@ -949,7 +949,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -965,7 +965,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -981,7 +981,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -997,7 +997,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1013,7 +1013,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1277,7 +1277,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1293,7 +1293,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1309,7 +1309,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1325,7 +1325,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1754,7 +1754,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1770,7 +1770,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1786,7 +1786,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1802,7 +1802,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1818,7 +1818,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -2268,7 +2268,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2284,7 +2284,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2300,7 +2300,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2316,7 +2316,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2496,7 +2496,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2628,7 +2628,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2644,7 +2644,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2660,7 +2660,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2676,7 +2676,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3386,7 +3386,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3634,7 +3634,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3650,7 +3650,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3666,7 +3666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3682,7 +3682,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3986,7 +3986,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4002,7 +4002,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4018,7 +4018,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4382,7 +4382,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6390,7 +6390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6406,7 +6406,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6422,7 +6422,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6438,7 +6438,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6734,7 +6734,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6750,7 +6750,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6766,7 +6766,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6782,7 +6782,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6998,7 +6998,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7014,7 +7014,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7030,7 +7030,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7046,7 +7046,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7845,7 +7845,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8671,7 +8671,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9554,7 +9554,7 @@ ] }, { - "id": 14, + "id": 1, "name": "MA-onofflight", "deviceTypeRef": { "id": 8, @@ -9702,7 +9702,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9718,7 +9718,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9734,7 +9734,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9750,7 +9750,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9950,7 +9950,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9966,7 +9966,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9982,7 +9982,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9998,7 +9998,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10334,7 +10334,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10350,7 +10350,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10366,7 +10366,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10382,7 +10382,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10644,7 +10644,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11446,7 +11446,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11462,7 +11462,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11478,7 +11478,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11494,7 +11494,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11510,7 +11510,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12906,7 +12906,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17180,7 +17180,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18054,7 +18054,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22799,7 +22799,7 @@ ] }, { - "id": 13, + "id": 4, "name": "MA-onofflight", "deviceTypeRef": { "id": 8, @@ -22947,7 +22947,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22963,7 +22963,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22979,7 +22979,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22995,7 +22995,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23195,7 +23195,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23211,7 +23211,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23227,7 +23227,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23243,7 +23243,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23563,7 +23563,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23579,7 +23579,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23595,7 +23595,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23611,7 +23611,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23627,7 +23627,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23857,7 +23857,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23873,7 +23873,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23889,7 +23889,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23905,7 +23905,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24251,7 +24251,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24267,7 +24267,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24283,7 +24283,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24299,7 +24299,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24315,7 +24315,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -25331,7 +25331,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -26014,7 +26014,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -26840,7 +26840,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -27083,7 +27083,7 @@ ] }, { - "id": 15, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 53, 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/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..783096c52d32b5 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -137,6 +137,15 @@ 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. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); 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..23e72383183ab3 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-bridge", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5018,7 +5044,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 6, + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + }, + "deviceTypes": [ + { + "id": 6, + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + } + ], + "deviceTypeRefs": [ + 6 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 14 + ], "deviceTypeName": "MA-aggregator", "deviceTypeCode": 14, "deviceTypeProfileId": 259, @@ -5751,7 +5803,33 @@ ] }, { + "id": 3, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7603,27 +7681,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": [] 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/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/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/chef/chef.py b/examples/chef/chef.py index aa594aef4c39fa..7e1b6238c69484 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) @@ -275,6 +278,7 @@ def main() -> int: linux silabs-thread ameba + telink Device Types: {deviceTypes} @@ -312,7 +316,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 +518,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 +550,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 +621,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 +656,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 +742,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 +925,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..3d3e8fca35cf16 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5417,7 +5443,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7501,18 +7553,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": [] 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..411c2ab7329d17 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 @@ -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..95485d649df1d5 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 3, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5420,7 +5420,7 @@ ] }, { - "id": 7, + "id": 6, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 45, @@ -9451,7 +9451,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10389,7 +10389,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10936,7 +10936,7 @@ ] }, { - "id": 4, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 46, @@ -15216,7 +15216,7 @@ ] }, { - "id": 6, + "id": 5, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 24, @@ -15888,7 +15888,7 @@ ] }, { - "id": 5, + "id": 3, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 27, @@ -16560,7 +16560,7 @@ ] }, { - "id": 8, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 34, 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..e6e64d2c301452 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 10, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5420,7 +5420,7 @@ ] }, { - "id": 9, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 37, 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..019dc0f1a093be 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 10, + "code": 268, + "profileId": 259, + "label": "MA-colortemperaturelight", + "name": "MA-colortemperaturelight" + }, + "deviceTypes": [ + { + "id": 10, + "code": 268, + "profileId": 259, + "label": "MA-colortemperaturelight", + "name": "MA-colortemperaturelight" + } + ], + "deviceTypeRefs": [ + 10 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 268 + ], "deviceTypeName": "MA-colortemperaturelight", "deviceTypeCode": 268, "deviceTypeProfileId": 259, @@ -7345,7 +7397,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8283,7 +8335,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8300,18 +8352,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": [] 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..3dcf59c84cbd54 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 21, + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + }, + "deviceTypes": [ + { + "id": 21, + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + } + ], + "deviceTypeRefs": [ + 21 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 21 + ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, "deviceTypeProfileId": 259, @@ -6306,18 +6358,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": [] 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..fb42122deb047e 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5468,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7526,18 +7578,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": [] diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter new file mode 100644 index 00000000000000..5374c1f6f53af2 --- /dev/null +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -0,0 +1,1378 @@ +// 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 Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +server cluster Binding = 30 { + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute TargetStruct binding[] = 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; +} + +/** 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 Groups { + ram attribute nameSupport; + 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 Groups { + ram attribute nameSupport; + 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 Binding { + callback attribute binding; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram 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..765e9fdd9a3550 --- /dev/null +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -0,0 +1,10848 @@ +{ + "featureLevel": 97, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 13, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": 14, + "name": "MA-dishwasher", + "deviceTypeRef": { + "id": 47, + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "id": 47, + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceTypeRefs": [ + 47 + ], + "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": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": 1, + "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": "1", + "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": "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": "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 + } + ], + "log": [] +} 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..87dfc871a3f41d 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceTypeRefs": [ + 29 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -8036,7 +8088,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8958,7 +9010,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9299,18 +9351,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": [] 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..0242e62528f3ef 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceTypeRefs": [ + 11 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7333,7 +7385,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8255,7 +8307,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8596,18 +8648,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": [] 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..762dfc66f57466 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5468,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 35, + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + }, + "deviceTypes": [ + { + "id": 35, + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + } + ], + "deviceTypeRefs": [ + 35 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 43 + ], "deviceTypeName": "MA-fan", "deviceTypeCode": 43, "deviceTypeProfileId": 259, @@ -6374,18 +6426,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": [] 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..1597985398042a 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 26, + "code": 774, + "profileId": 259, + "label": "MA-flowsensor", + "name": "MA-flowsensor" + }, + "deviceTypes": [ + { + "id": 26, + "code": 774, + "profileId": 259, + "label": "MA-flowsensor", + "name": "MA-flowsensor" + } + ], + "deviceTypeRefs": [ + 26 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 774 + ], "deviceTypeName": "MA-flowsensor", "deviceTypeCode": 774, "deviceTypeProfileId": 259, @@ -6354,18 +6406,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": [] 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..e80e5499b9da48 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 33, + "code": 768, + "profileId": 259, + "label": "MA-heatcool", + "name": "MA-heatcool" + }, + "deviceTypes": [ + { + "id": 33, + "code": 768, + "profileId": 259, + "label": "MA-heatcool", + "name": "MA-heatcool" + } + ], + "deviceTypeRefs": [ + 33 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 768 + ], "deviceTypeName": "MA-heatcool", "deviceTypeCode": 768, "deviceTypeProfileId": 259, @@ -8174,18 +8226,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": [] 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..361b2e2521fabf 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + }, + "deviceTypes": [ + { + "id": 27, + "code": 775, + "profileId": 259, + "label": "MA-humiditysensor", + "name": "MA-humiditysensor" + } + ], + "deviceTypeRefs": [ + 27 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 775 + ], "deviceTypeName": "MA-humiditysensor", "deviceTypeCode": 775, "deviceTypeProfileId": 259, @@ -6354,18 +6406,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": [] diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter new file mode 100644 index 00000000000000..691df7134838f0 --- /dev/null +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -0,0 +1,1331 @@ +// 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 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 Groups { + ram attribute nameSupport; + 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..8bae0a9da88e68 --- /dev/null +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -0,0 +1,11096 @@ +{ + "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": 8, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": 7, + "name": "MA-laundry-washer", + "deviceTypeRef": { + "id": 49, + "code": 115, + "profileId": 259, + "label": "MA-laundry-washer", + "name": "MA-laundry-washer" + }, + "deviceTypes": [ + { + "id": 49, + "code": 115, + "profileId": 259, + "label": "MA-laundry-washer", + "name": "MA-laundry-washer" + } + ], + "deviceTypeRefs": [ + 49 + ], + "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": "1", + "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": "1", + "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 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 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..891c8c063506c4 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 22, + "code": 262, + "profileId": 259, + "label": "MA-lightsensor", + "name": "MA-lightsensor" + }, + "deviceTypes": [ + { + "id": 22, + "code": 262, + "profileId": 259, + "label": "MA-lightsensor", + "name": "MA-lightsensor" + } + ], + "deviceTypeRefs": [ + 22 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 262 + ], "deviceTypeName": "MA-lightsensor", "deviceTypeCode": 262, "deviceTypeProfileId": 259, @@ -6370,18 +6422,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": [] 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..b335ca316d508a 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 23, + "code": 263, + "profileId": 259, + "label": "MA-occupancysensor", + "name": "MA-occupancysensor" + }, + "deviceTypes": [ + { + "id": 23, + "code": 263, + "profileId": 259, + "label": "MA-occupancysensor", + "name": "MA-occupancysensor" + } + ], + "deviceTypeRefs": [ + 23 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 263 + ], "deviceTypeName": "MA-occupancysensor", "deviceTypeCode": 263, "deviceTypeProfileId": 259, @@ -6482,18 +6534,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": [] 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..d10bd7429a360f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 8, + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "id": 8, + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + } + ], + "deviceTypeRefs": [ + 8 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 256 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -7478,18 +7530,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": [] 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..0f87ab83f0f976 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + }, + "deviceTypes": [ + { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceTypeRefs": [ + 15 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], "deviceTypeName": "MA-onofflightswitch", "deviceTypeCode": 259, "deviceTypeProfileId": 259, @@ -7478,18 +7530,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": [] 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..d19660dd111a65 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 12, + "code": 266, + "profileId": 259, + "label": "MA-onoffpluginunit", + "name": "MA-onoffpluginunit" + }, + "deviceTypes": [ + { + "id": 12, + "code": 266, + "profileId": 259, + "label": "MA-onoffpluginunit", + "name": "MA-onoffpluginunit" + } + ], + "deviceTypeRefs": [ + 12 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 266 + ], "deviceTypeName": "MA-onoffpluginunit", "deviceTypeCode": 266, "deviceTypeProfileId": 259, @@ -7154,18 +7206,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": [] 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..838e3561b1c506 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 25, + "code": 773, + "profileId": 259, + "label": "MA-pressuresensor", + "name": "MA-pressuresensor" + }, + "deviceTypes": [ + { + "id": 25, + "code": 773, + "profileId": 259, + "label": "MA-pressuresensor", + "name": "MA-pressuresensor" + } + ], + "deviceTypeRefs": [ + 25 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 773 + ], "deviceTypeName": "MA-pressuresensor", "deviceTypeCode": 773, "deviceTypeProfileId": 259, @@ -6434,18 +6486,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": [] 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..f03f07603a394a 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6215,7 +6241,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceTypeRefs": [ + 14 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7525,18 +7577,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": [] 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..f0584c5561216e --- /dev/null +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -0,0 +1,1335 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** 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 Groups { + ram attribute nameSupport; + 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..75587fe72f54a8 --- /dev/null +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -0,0 +1,12752 @@ +{ + "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": 8, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "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": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": 7, + "name": "MA-refrigerator", + "deviceTypeRef": { + "id": 48, + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + }, + "deviceTypes": [ + { + "id": 48, + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator" + } + ], + "deviceTypeRefs": [ + 48 + ], + "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": "1", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 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": 5, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 51, + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "id": 51, + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceTypeRefs": [ + 51 + ], + "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": 6, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 51, + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + }, + "deviceTypes": [ + { + "id": 51, + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet" + } + ], + "deviceTypeRefs": [ + 51 + ], + "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 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 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..ee7762e4f302ef 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 50, + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + }, + "deviceTypes": [ + { + "id": 50, + "code": 116, + "profileId": 259, + "label": "MA-robotic-vacuum-cleaner", + "name": "MA-robotic-vacuum-cleaner" + } + ], + "deviceTypeRefs": [ + 50 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 116 + ], "deviceTypeName": "MA-robotic-vacuum-cleaner", "deviceTypeCode": 116, "deviceTypeProfileId": 259, @@ -9339,7 +9391,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10277,7 +10329,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10830,18 +10882,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": [] diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index e050bc914a2c61..a912923932502d 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -10117,7 +10117,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11055,7 +11055,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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..bb5372c901a309 --- /dev/null +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -0,0 +1,11268 @@ +{ + "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": 10, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "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": 9, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 3, + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + "deviceTypes": [ + { + "id": 3, + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + }, + { + "id": 44, + "code": 118, + "profileId": 259, + "label": "MA-smokecoalarm", + "name": "MA-smokecoalarm" + } + ], + "deviceTypeRefs": [ + 3, + 44 + ], + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 0, + "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 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 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..227be12d36f0eb 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 40, + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + }, + "deviceTypes": [ + { + "id": 40, + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + } + ], + "deviceTypeRefs": [ + 40 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 34 + ], "deviceTypeName": "MA-speaker", "deviceTypeCode": 34, "deviceTypeProfileId": 259, @@ -6586,18 +6638,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": [] 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..5e2dec02d304b1 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceTypeRefs": [ + 24 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 770, "deviceTypeProfileId": 259, @@ -6354,18 +6406,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": [] 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..22f3247af489bf 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -23,17 +29,37 @@ "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": 7, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 55, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 55, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 55 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5442,7 +5468,33 @@ ] }, { + "id": 8, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 87, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "id": 87, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceTypeRefs": [ + 87 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -7471,7 +7523,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7834,18 +7886,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": [] 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..b20b648b19452a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5394,7 +5420,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 31, + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + }, + "deviceTypes": [ + { + "id": 31, + "code": 514, + "profileId": 259, + "label": "MA-windowcovering", + "name": "MA-windowcovering" + } + ], + "deviceTypeRefs": [ + 31 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 514 + ], "deviceTypeName": "MA-windowcovering", "deviceTypeCode": 514, "deviceTypeProfileId": 259, @@ -7036,18 +7088,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": [] diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index f74e712a6b4ff5..daa049bec63d18 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -8623,7 +8623,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9561,7 +9561,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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..fe32b0c929b0a7 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": 97, "creator": "zap", "keyValuePairs": [ { @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -239,7 +265,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -433,7 +459,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -1971,7 +1997,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormat", + "type": "HourFormatEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -1987,7 +2013,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "CalendarType", + "type": "CalendarTypeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -2069,7 +2095,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "TempUnit", + "type": "TempUnitEnum", "included": 0, "storageOption": "NVM", "singleton": 0, @@ -2237,7 +2263,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2253,7 +2279,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "RegulatoryLocationTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2493,7 +2519,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatus", + "type": "NetworkCommissioningStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3034,7 +3060,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "RoutingRole", + "type": "RoutingRoleEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4120,7 +4146,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "SecurityTypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4136,7 +4162,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "WiFiVersionEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5343,7 +5369,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -5421,7 +5473,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5589,7 +5641,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5807,7 +5859,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7178,7 +7230,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7588,7 +7640,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7635,7 +7687,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OccupancyBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7651,7 +7703,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "OccupancySensorTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7667,7 +7719,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OccupancySensorTypeBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7721,18 +7773,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] diff --git a/examples/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..d83c730a8f61e2 --- /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_B91_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..ec9b4702de0a3d 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)) 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..7a3735e213e049 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 @@ -284,6 +284,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( 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..e4ef5141fd1938 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5385,7 +5411,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 21, + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + }, + "deviceTypes": [ + { + "id": 21, + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + } + ], + "deviceTypeRefs": [ + 21 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 21 + ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, "deviceTypeProfileId": 259, @@ -7717,7 +7769,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8639,7 +8691,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8772,18 +8824,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": [] 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/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index c45266fb7a2c07..f572311a53c2c5 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]; @@ -127,7 +132,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]; @@ -180,7 +188,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]; @@ -234,7 +245,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)]; diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 597af3c96270d8..b717e8acf13005 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -39,9 +39,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..de954c4bb4bb69 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -1389,7 +1415,7 @@ "side": "server", "type": "char_string", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -6226,7 +6252,33 @@ ] }, { - "name": "MA-dimmablelight", + "id": 1, + "name": "MA-dishwasher", + "deviceTypeRef": { + "id": 47, + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "id": 47, + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceTypeRefs": [ + 47 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 117 + ], "deviceTypeName": "MA-dishwasher", "deviceTypeCode": 117, "deviceTypeProfileId": 259, @@ -9727,7 +9779,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10649,7 +10701,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10782,18 +10834,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": [] 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/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..5e83229e81a428 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 @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 10, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5902,7 +5902,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5918,7 +5918,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5934,7 +5934,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5950,7 +5950,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5966,7 +5966,7 @@ "side": "server", "type": "int32u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -5982,7 +5982,7 @@ "side": "server", "type": "int16u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5998,7 +5998,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6014,7 +6014,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6030,7 +6030,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6046,7 +6046,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6092,7 +6092,7 @@ ] }, { - "id": 8, + "id": 3, "name": "MA-onofflightswitch", "deviceTypeRef": { "id": 15, @@ -8261,7 +8261,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8655,7 +8655,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8766,7 +8766,7 @@ ] }, { - "id": 9, + "id": 2, "name": "MA-genericswitch", "deviceTypeRef": { "id": 20, diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 405664af872c24..6bc4138a9d635a 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -179,6 +179,15 @@ CHIP_ERROR AppTask::Init() return System::MapErrorZephyr(ret); } +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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..03572a2b7b4e6f 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 @@ -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/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..779988b5bd3c0d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5464,33 @@ ] }, { + "id": 2, "name": "MA-extendedcolorlight", + "deviceTypeRef": { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceTypeRefs": [ + 11 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7273,7 +7325,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8195,7 +8247,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8328,18 +8380,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": [] 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..e5524a5ae20819 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5464,33 @@ ] }, { + "id": 1, "name": "MA-extendedcolorlight", + "deviceTypeRef": { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceTypeRefs": [ + 11 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -7273,7 +7325,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8195,7 +8247,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8328,18 +8380,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": [] 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/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..cbac430e8a2932 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4727,7 +4753,33 @@ ] }, { + "id": 1, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -6690,7 +6742,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7612,7 +7664,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7745,18 +7797,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index e16230e000ca0f..a2ad1d6e5996e5 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -217,6 +217,15 @@ CHIP_ERROR AppTask::Init() } mPWMDevice.SetCallbacks(ActionInitiated, ActionCompleted); +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#endif + // Initialize CHIP server #if CONFIG_CHIP_FACTORY_DATA ReturnErrorOnFailure(mFactoryDataProvider.Init()); 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..520039f45c8ab0 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5486,7 +5512,33 @@ ] }, { + "id": 1, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 8, + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + }, + "deviceTypes": [ + { + "id": 8, + "code": 256, + "profileId": 259, + "label": "MA-onofflight", + "name": "MA-onofflight" + } + ], + "deviceTypeRefs": [ + 8 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 256 + ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -7837,7 +7889,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8759,7 +8811,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9100,18 +9152,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": [] 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..57926603d7d604 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6390,7 +6416,33 @@ ] }, { + "id": 2, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "id": 11, + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceTypeRefs": [ + 11 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], "deviceTypeName": "MA-extendedcolorlight", "deviceTypeCode": 269, "deviceTypeProfileId": 259, @@ -9197,7 +9249,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10135,7 +10187,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -10268,18 +10320,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": [] 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 cf95cd3ce0fda9..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; @@ -2526,13 +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; } @@ -2559,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 ef3e696a8900d9..474821f1f1902a 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 22, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5790,7 +5790,7 @@ ] }, { - "id": 23, + "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { "id": 9, @@ -5938,7 +5938,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5954,7 +5954,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5970,7 +5970,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5986,7 +5986,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6186,7 +6186,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6202,7 +6202,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6218,7 +6218,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6234,7 +6234,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6896,7 +6896,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6912,7 +6912,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6928,7 +6928,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6944,7 +6944,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7366,7 +7366,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7546,7 +7546,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7562,7 +7562,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7578,7 +7578,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7594,7 +7594,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7610,7 +7610,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7869,7 +7869,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8289,7 +8289,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8494,7 +8494,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9416,7 +9416,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 ed1d97d62b92e4..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; @@ -2370,7 +2377,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; } @@ -2397,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 e164611241befb..1c71379552a8b6 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 25, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5536,7 +5536,7 @@ ] }, { - "id": 24, + "id": 2, "name": "MA-dimmablelight", "deviceTypeRef": { "id": 9, @@ -5684,7 +5684,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5700,7 +5700,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5716,7 +5716,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5732,7 +5732,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5932,7 +5932,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5948,7 +5948,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5964,7 +5964,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5980,7 +5980,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6618,7 +6618,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6634,7 +6634,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6650,7 +6650,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6666,7 +6666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7088,7 +7088,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7268,7 +7268,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7284,7 +7284,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7300,7 +7300,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7316,7 +7316,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7332,7 +7332,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8383,7 +8383,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8579,7 +8579,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9501,7 +9501,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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/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/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 c0b98e65560a01..9d9759848783f3 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -509,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; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index e23670a09ebf80..5bf8b66ba66051 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 26, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 3, @@ -759,7 +759,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -775,7 +775,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -791,7 +791,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -807,7 +807,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -823,7 +823,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1003,7 +1003,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1019,7 +1019,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1035,7 +1035,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1487,7 +1487,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1503,7 +1503,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1519,7 +1519,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1535,7 +1535,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1551,7 +1551,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -2015,7 +2015,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2031,7 +2031,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2047,7 +2047,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2063,7 +2063,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2211,7 +2211,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2227,7 +2227,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2243,7 +2243,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2259,7 +2259,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2375,7 +2375,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2391,7 +2391,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2407,7 +2407,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2423,7 +2423,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2749,7 +2749,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2877,7 +2877,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3069,7 +3069,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3101,7 +3101,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3117,7 +3117,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3133,7 +3133,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3149,7 +3149,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3390,7 +3390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3406,7 +3406,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3422,7 +3422,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3438,7 +3438,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3742,7 +3742,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3758,7 +3758,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3774,7 +3774,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3790,7 +3790,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4106,7 +4106,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4122,7 +4122,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4138,7 +4138,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4154,7 +4154,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6117,7 +6117,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6133,7 +6133,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6149,7 +6149,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6165,7 +6165,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6461,7 +6461,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6477,7 +6477,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6493,7 +6493,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6509,7 +6509,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6725,7 +6725,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6741,7 +6741,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6757,7 +6757,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7305,7 +7305,7 @@ ] }, { - "id": 27, + "id": 2, "name": "MA-doorlock", "deviceTypeRef": { "id": 29, @@ -7453,7 +7453,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7469,7 +7469,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7485,7 +7485,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7501,7 +7501,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8331,7 +8331,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8347,7 +8347,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8363,7 +8363,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8379,7 +8379,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8395,7 +8395,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9027,7 +9027,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9155,7 +9155,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9347,7 +9347,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9379,7 +9379,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9395,7 +9395,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9411,7 +9411,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9427,7 +9427,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10339,7 +10339,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index aa65236ba747d2..ab5df56d36d9d4 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -187,6 +187,15 @@ CHIP_ERROR AppTask::Init() BoltLockMgr().Init(LockStateChanged); +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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..89b565629b61a8 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5486,7 +5512,33 @@ ] }, { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceTypeRefs": [ + 29 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -6707,18 +6759,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": [] diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index b51392cfaf1cc6..d0ce7a043e25d0 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6345,7 +6371,33 @@ ] }, { + "id": 2, "name": "MA-doorlock", + "deviceTypeRef": { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + }, + "deviceTypes": [ + { + "id": 29, + "code": 10, + "profileId": 259, + "label": "MA-doorlock", + "name": "MA-doorlock" + } + ], + "deviceTypeRefs": [ + 29 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 10 + ], "deviceTypeName": "MA-doorlock", "deviceTypeCode": 10, "deviceTypeProfileId": 259, @@ -9386,18 +9438,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": [] 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/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 471aecc6982341..78e05e37b1da6b 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + }, + "deviceTypes": [ + { + "id": 52, + "code": 0, + "profileId": 259, + "label": "MA-all-clusters-app", + "name": "MA-all-clusters-app" + } + ], + "deviceTypeRefs": [ + 52 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 0 + ], "deviceTypeName": "MA-all-clusters-app", "deviceTypeCode": 0, "deviceTypeProfileId": 259, @@ -2580,7 +2606,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3406,7 +3432,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3523,9 +3549,7 @@ "endpointTypeIndex": 0, "profileId": 598, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": null + "networkId": 0 } ], "log": [] 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..55f04a968f71ea 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4044,7 +4070,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4870,7 +4896,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4987,9 +5013,7 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 } ], "log": [] 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_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..339541aa07151b 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -4121,7 +4147,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4947,7 +4973,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5058,7 +5084,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + }, + "deviceTypes": [ + { + "id": 15, + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceTypeRefs": [ + 15 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], "deviceTypeName": "MA-onofflightswitch", "deviceTypeCode": 259, "deviceTypeProfileId": 259, @@ -6900,7 +6952,33 @@ ] }, { + "id": 3, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 53, + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + }, + "deviceTypes": [ + { + "id": 53, + "code": 61442, + "profileId": 259, + "label": "MA-secondary-network-commissioning", + "name": "MA-secondary-network-commissioning" + } + ], + "deviceTypeRefs": [ + 53 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 61442 + ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -7446,27 +7524,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": [] 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..8a5033a3f6f3b1 100644 --- a/examples/pigweed-app/esp32/sdkconfig.defaults +++ b/examples/pigweed-app/esp32/sdkconfig.defaults @@ -43,3 +43,5 @@ CONFIG_DEVICE_PRODUCT_ID=0x800B # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index e12c42d6b45a19..be49149c26e9dd 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 { @@ -1009,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; @@ -7426,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 a32f70889c4c58..8fc11afcb89c2f 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 28, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 3, @@ -195,7 +195,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -211,7 +211,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -227,7 +227,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -243,7 +243,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -259,7 +259,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1087,7 +1087,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1103,7 +1103,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1119,7 +1119,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1135,7 +1135,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1151,7 +1151,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1290,7 +1290,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1306,7 +1306,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1322,7 +1322,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1338,7 +1338,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1354,7 +1354,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1502,7 +1502,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1518,7 +1518,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1534,7 +1534,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1550,7 +1550,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1666,7 +1666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1682,7 +1682,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1698,7 +1698,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1714,7 +1714,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2392,7 +2392,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2408,7 +2408,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2424,7 +2424,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2440,7 +2440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2704,7 +2704,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3024,7 +3024,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3040,7 +3040,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3056,7 +3056,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3336,7 +3336,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3352,7 +3352,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3368,7 +3368,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3384,7 +3384,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5837,7 +5837,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5853,7 +5853,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5869,7 +5869,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5885,7 +5885,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6085,7 +6085,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6181,7 +6181,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6197,7 +6197,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6213,7 +6213,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6229,7 +6229,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6381,7 +6381,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6397,7 +6397,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6413,7 +6413,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6429,7 +6429,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6445,7 +6445,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6461,7 +6461,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6477,7 +6477,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6493,7 +6493,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12099,7 +12099,7 @@ ] }, { - "id": 29, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 9, @@ -14768,7 +14768,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15642,7 +15642,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 39e7e3ad5b932d..40f35329b7a5d2 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 { @@ -992,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; @@ -7369,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 bfeaee11de0175..931ee37410a193 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 30, + "id": 2, "name": "MA-rootdevice", "deviceTypeRef": { "id": 3, @@ -195,7 +195,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -211,7 +211,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -227,7 +227,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -243,7 +243,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -259,7 +259,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1087,7 +1087,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1103,7 +1103,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1119,7 +1119,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1135,7 +1135,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1151,7 +1151,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1306,7 +1306,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1322,7 +1322,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1338,7 +1338,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1354,7 +1354,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1502,7 +1502,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1518,7 +1518,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1534,7 +1534,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1550,7 +1550,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1666,7 +1666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1682,7 +1682,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1698,7 +1698,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1714,7 +1714,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2392,7 +2392,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2408,7 +2408,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2424,7 +2424,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2440,7 +2440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2704,7 +2704,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3024,7 +3024,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3040,7 +3040,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3056,7 +3056,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3336,7 +3336,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3352,7 +3352,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3368,7 +3368,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3384,7 +3384,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5837,7 +5837,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5853,7 +5853,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5869,7 +5869,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5885,7 +5885,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6085,7 +6085,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6181,7 +6181,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6197,7 +6197,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6213,7 +6213,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6229,7 +6229,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6381,7 +6381,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6397,7 +6397,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6413,7 +6413,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6429,7 +6429,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6445,7 +6445,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6461,7 +6461,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6477,7 +6477,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6493,7 +6493,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12183,7 +12183,7 @@ ] }, { - "id": 31, + "id": 1, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 9, @@ -14568,7 +14568,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15442,7 +15442,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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/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/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..f1c1c916aa0aa7 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,23 @@ void InitBasicOTARequestor() sOTARequestorDriver.Init(&sOTARequestor, &imageProcessor); imageProcessor.TriggerFlashAction(ExternalFlashManager::Action::SLEEP); } + +CHIP_ERROR OtaConfirmNewImage() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + OTAImageProcessorImpl & imageProcessor = GetOTAImageProcessor(); + if (imageProcessor.IsFirstImageRun()) + { + CHIP_ERROR err = System::MapErrorZephyr(boot_write_img_confirmed()); + if (CHIP_NO_ERROR == err) + { + imageProcessor.SetImageConfirmed(); + } + } + ChipLogError(SoftwareUpdate, "Failed to confirm firmware image, it will be reverted on the next boot"); + return err; +} + #endif ExternalFlashManager & GetFlashHandler() diff --git a/examples/platform/nrfconnect/util/include/OTAUtil.h b/examples/platform/nrfconnect/util/include/OTAUtil.h index 55b51129aa81a0..2e120f6b7db096 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. + */ +CHIP_ERROR OtaConfirmNewImage(); + #endif // CONFIG_CHIP_OTA_REQUESTOR /** diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index cd37c4615fa4bb..f0760d901fda73 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,11 @@ #include #endif // SL_WIFI +#ifdef DIC_ENABLE +#include "dic.h" +#include "dic_control.h" +#endif // DIC_ENABLE + /********************************************************** * Defines and Constants *********************************************************/ @@ -74,7 +78,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 +100,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 +144,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,11 +235,15 @@ 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*/); @@ -267,7 +291,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 +314,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 +416,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 +555,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..e8ec24ed72a905 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,6 +169,13 @@ 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) @@ -213,15 +221,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 diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 36f78aa84839c2..59503db5e4e143 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; @@ -172,7 +176,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()); @@ -263,14 +267,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..f54175ae9733da --- /dev/null +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c @@ -0,0 +1,789 @@ +/* + * + * 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) +{ + 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_CONNECTING | 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 CHIP_DEVICE_CONFIG_ENABLE_SED +/****************************************************************** + * @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 /* CHIP_DEVICE_CONFIG_ENABLE_SED */ + +/************************************************************************************* + * @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/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..c89f31142beb96 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.c +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.c @@ -628,14 +628,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) 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/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index a59f660a8a7788..a64e2c7d5bf2e2 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -157,7 +157,8 @@ class AppFabricTableDelegate : public FabricTable::Delegate { if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) { - bool isCommissioningFailed = chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen(); + bool isBasicCommissioningMode = chip::Server::GetInstance().GetCommissioningWindowManager().GetCommissioningMode() == + Dnssd::CommissioningMode::kEnabledBasic; ChipLogProgress(DeviceLayer, "Performing erasing of settings partition"); #ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS @@ -169,7 +170,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate status = nvs_clear(static_cast(storage)); } - if (!isCommissioningFailed) + if (!isBasicCommissioningMode) { if (!status) { @@ -191,7 +192,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate ConnectivityMgr().ErasePersistentInfo(); #endif - if (isCommissioningFailed) + if (isBasicCommissioningMode) { PlatformMgr().Shutdown(); } 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..d21908bfa165b4 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -160,6 +160,15 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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..af278263bea1d2 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5696,33 @@ ] }, { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceTypeRefs": [ + 14 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,18 +8024,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": [] 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..8b8fc821323b64 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5696,33 @@ ] }, { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceTypeRefs": [ + 14 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,18 +8024,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": [] 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..ad985a894a1f4d 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-pump", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5670,7 +5696,33 @@ ] }, { + "id": 1, "name": "MA-pump", + "deviceTypeRef": { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + }, + "deviceTypes": [ + { + "id": 14, + "code": 771, + "profileId": 2457, + "label": "MA-pump", + "name": "MA-pump" + } + ], + "deviceTypeRefs": [ + 14 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 771 + ], "deviceTypeName": "MA-pump", "deviceTypeCode": 771, "deviceTypeProfileId": 2457, @@ -7972,18 +8024,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": [] 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..f1b0fb19a3a19b 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -158,6 +158,15 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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..4ddbc45f851702 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5618,7 +5644,33 @@ ] }, { + "id": 2, "name": "MA-pumpcontroller", + "deviceTypeRef": { + "id": 19, + "code": 772, + "profileId": 2457, + "label": "MA-pumpcontroller", + "name": "MA-pumpcontroller" + }, + "deviceTypes": [ + { + "id": 19, + "code": 772, + "profileId": 2457, + "label": "MA-pumpcontroller", + "name": "MA-pumpcontroller" + } + ], + "deviceTypeRefs": [ + 19 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 772 + ], "deviceTypeName": "MA-pumpcontroller", "deviceTypeCode": 772, "deviceTypeProfileId": 2457, @@ -6800,18 +6852,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": [] 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..85a69adcb65dea 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; 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..4f612e4090eeef 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5438,7 +5464,33 @@ ] }, { + "id": 2, "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 35, + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + }, + "deviceTypes": [ + { + "id": 35, + "code": 43, + "profileId": 259, + "label": "MA-fan", + "name": "MA-fan" + } + ], + "deviceTypeRefs": [ + 35 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 43 + ], "deviceTypeName": "MA-fan", "deviceTypeCode": 43, "deviceTypeProfileId": 259, @@ -6942,18 +6994,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": [] 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/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 7425da173360f4..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; 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 64d349dbf16b8b..f3c9f6c5f59854 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 @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 37, + "id": 1, "name": "MA-rootdevice", "deviceTypeRef": { "id": 2, @@ -5571,7 +5571,7 @@ ] }, { - "id": 36, + "id": 2, "name": "Anonymous Endpoint Type", "deviceTypeRef": { "id": 3, @@ -6115,7 +6115,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6131,7 +6131,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6147,7 +6147,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6163,7 +6163,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6179,7 +6179,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6195,7 +6195,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6211,7 +6211,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6227,7 +6227,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6243,7 +6243,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", 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/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.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/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..1f50f0757d2ef6 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -3314,10 +3340,36 @@ ] }, { + "id": 2, "name": "MA-tempsensor", - "deviceTypeName": null, - "deviceTypeCode": null, - "deviceTypeProfileId": null, + "deviceTypeRef": { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + }, + "deviceTypes": [ + { + "id": 24, + "code": 770, + "profileId": 259, + "label": "MA-tempsensor", + "name": "MA-tempsensor" + } + ], + "deviceTypeRefs": [ + 24 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 770 + ], + "deviceTypeName": "MA-tempsensor", + "deviceTypeCode": 770, + "deviceTypeProfileId": 259, "clusters": [ { "name": "Identify", @@ -4194,18 +4246,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": [] 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/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..0a6a637d51fb2a 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -23,17 +29,37 @@ "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": 5, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 55, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 55, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 55 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -6168,7 +6194,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6994,7 +7020,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7629,7 +7655,33 @@ ] }, { + "id": 6, "name": "MA-thermostat", + "deviceTypeRef": { + "id": 87, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "id": 87, + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceTypeRefs": [ + 87 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], "deviceTypeName": "MA-thermostat", "deviceTypeCode": 769, "deviceTypeProfileId": 259, @@ -8010,7 +8062,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -11626,7 +11678,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -11946,7 +11998,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -12772,7 +12824,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -14769,18 +14821,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": [] 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..d2488a3c098a12 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 3, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5934,7 +5960,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6760,7 +6786,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7411,7 +7437,33 @@ ] }, { + "id": 4, "name": "MA-videoplayer", + "deviceTypeRef": { + "id": 36, + "code": 35, + "profileId": 259, + "label": "MA-casting-videoplayer", + "name": "MA-casting-videoplayer" + }, + "deviceTypes": [ + { + "id": 36, + "code": 35, + "profileId": 259, + "label": "MA-casting-videoplayer", + "name": "MA-casting-videoplayer" + } + ], + "deviceTypeRefs": [ + 36 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 35 + ], "deviceTypeName": "MA-casting-videoplayer", "deviceTypeCode": 35, "deviceTypeProfileId": 259, @@ -9741,7 +9793,33 @@ ] }, { + "id": 1, "name": "MA-speaker", + "deviceTypeRef": { + "id": 40, + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + }, + "deviceTypes": [ + { + "id": 40, + "code": 34, + "profileId": 259, + "label": "MA-speaker", + "name": "MA-speaker" + } + ], + "deviceTypeRefs": [ + 40 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 34 + ], "deviceTypeName": "MA-speaker", "deviceTypeCode": 34, "deviceTypeProfileId": 259, @@ -10515,7 +10593,33 @@ ] }, { + "id": 2, "name": "MA-contentapplication", + "deviceTypeRef": { + "id": 41, + "code": 36, + "profileId": 259, + "label": "MA-contentapp", + "name": "MA-contentapp" + }, + "deviceTypes": [ + { + "id": 41, + "code": 36, + "profileId": 259, + "label": "MA-contentapp", + "name": "MA-contentapp" + } + ], + "deviceTypeRefs": [ + 41 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 36 + ], "deviceTypeName": "MA-contentapp", "deviceTypeCode": 36, "deviceTypeProfileId": 259, @@ -12429,36 +12533,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": [] 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/tv-casting-common/core/CastingApp.cpp b/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp index cc21c29c9b5f30..3dd42d91d293bb 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp +++ b/examples/tv-casting-app/tv-casting-common/core/CastingApp.cpp @@ -118,7 +118,7 @@ CHIP_ERROR CastingApp::Stop() // Shutdown the Matter server chip::Server::GetInstance().Shutdown(); - mState = NOT_RUNNING; // CastingApp started successfully, set state to RUNNING + mState = NOT_RUNNING; // CastingApp stopped successfully, set state to NOT_RUNNING return CHIP_ERROR_NOT_IMPLEMENTED; } diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingApp.h b/examples/tv-casting-app/tv-casting-common/core/CastingApp.h index 1f122e1153c3ab..eed69e728d4358 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingApp.h +++ b/examples/tv-casting-app/tv-casting-common/core/CastingApp.h @@ -53,20 +53,13 @@ class CastingApp CHIP_ERROR Initialize(const matter::casting::support::AppParameters & appParameters); /** - * @brief Starts the Matter server that the CastingApp runs on and calls PostStartRegistrations() to finish starting up the + * @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 Perform post Matter server startup registrations - * - * @return CHIP_ERROR - CHIP_NO_ERROR if all registrations succeeded, specific error code otherwise - */ - CHIP_ERROR PostStartRegistrations(); - /** * @brief Stops the Matter server that the CastingApp runs on * @@ -81,6 +74,13 @@ class 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; diff --git a/examples/tv-casting-app/tv-casting-common/core/Types.h b/examples/tv-casting-app/tv-casting-common/core/Types.h index a5dce75d60d181..691fc3d2b36944 100644 --- a/examples/tv-casting-app/tv-casting-common/core/Types.h +++ b/examples/tv-casting-app/tv-casting-common/core/Types.h @@ -37,11 +37,11 @@ using Strong = std::shared_ptr; } // namespace memory -namespace app { +namespace core { class CastingApp; -}; +}; // namespace core namespace support { 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..6255dcf327c397 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 @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5991,7 +6017,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6817,7 +6843,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7060,7 +7086,33 @@ ] }, { + "id": 2, "name": "MA-videoplayer", + "deviceTypeRef": { + "id": 38, + "code": 41, + "profileId": 259, + "label": "MA-casting-videoclient", + "name": "MA-casting-videoclient" + }, + "deviceTypes": [ + { + "id": 38, + "code": 41, + "profileId": 259, + "label": "MA-casting-videoclient", + "name": "MA-casting-videoclient" + } + ], + "deviceTypeRefs": [ + 38 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 41 + ], "deviceTypeName": "MA-casting-videoclient", "deviceTypeCode": 41, "deviceTypeProfileId": 259, @@ -11535,7 +11587,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -12361,7 +12413,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -15416,18 +15468,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": [] 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..7bd3d94c04c4bc 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 @@ -33,10 +33,10 @@ ], "endpointTypes": [ { - "id": 1, + "id": 7, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 2, + "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -44,7 +44,7 @@ }, "deviceTypes": [ { - "id": 2, + "id": 55, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -52,7 +52,7 @@ } ], "deviceTypeRefs": [ - 2 + 55 ], "deviceVersions": [ 1 @@ -5960,7 +5960,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6786,7 +6786,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -7029,10 +7029,10 @@ ] }, { - "id": 2, + "id": 8, "name": "MA-videoplayer", "deviceTypeRef": { - "id": 8, + "id": 61, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -7040,7 +7040,7 @@ }, "deviceTypes": [ { - "id": 8, + "id": 61, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -7048,7 +7048,7 @@ } ], "deviceTypeRefs": [ - 8 + 61 ], "deviceVersions": [ 1 @@ -8934,7 +8934,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "Status", @@ -9432,6 +9432,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 +9480,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 +9538,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9798,7 +9830,7 @@ "mfgCode": null, "define": "DOOR_LOCK_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "GetWeekDayScheduleResponse", @@ -10274,6 +10306,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 +12230,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13055,7 +13117,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13106,7 +13168,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index cffa1be10e3529..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; @@ -2304,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; @@ -2382,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 cf44a856e05f64..628aaed4485b21 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -33,7 +33,7 @@ ], "endpointTypes": [ { - "id": 38, + "id": 2, "name": "MA-windowcovering", "deviceTypeRef": { "id": 3, @@ -897,7 +897,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -945,7 +945,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1173,7 +1173,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1625,7 +1625,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1673,7 +1673,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -2185,7 +2185,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2381,7 +2381,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2545,7 +2545,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2821,7 +2821,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3141,7 +3141,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3173,7 +3173,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3189,7 +3189,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3205,7 +3205,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3221,7 +3221,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3485,7 +3485,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3837,7 +3837,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4149,7 +4149,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6187,7 +6187,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6531,7 +6531,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6795,7 +6795,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6989,7 +6989,7 @@ ] }, { - "id": 40, + "id": 1, "name": "MA-windowcovering", "deviceTypeRef": { "id": 31, @@ -7498,7 +7498,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -8551,7 +8551,7 @@ ] }, { - "id": 39, + "id": 3, "name": "MA-windowcovering", "deviceTypeRef": { "id": 31, @@ -9060,7 +9060,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 38e20fd503d4ea..5b80507a375c71 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -165,6 +165,15 @@ CHIP_ERROR AppTask::Init() GetDFUOverSMP().ConfirmNewImage(); #endif +#ifdef CONFIG_CHIP_OTA_REQUESTOR + /* OTA image confirmation must be done before the factory data init. */ + err = OtaConfirmNewImage(); + if (err != CHIP_NO_ERROR) + { + return err; + } +#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/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index ca7bc016f5ad62..bd451da8a19808 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 +10 : [Telink] Update Docker image (Zephyr update) 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-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..1f25e6edaa976d 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -602,6 +602,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"), ]) 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/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/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..d333ff86dc3e43 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] 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] 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/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/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/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index c1b1fa53446ab5..575a05d95871ad 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -207,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/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 472d3cd8fa8203..a25183feb6a9a6 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -122,9 +122,6 @@ def run(self, config: TestRunnerConfig) -> bool: class TestRunner(TestRunnerBase): - """ - TestRunner is a default runner implementation. - """ async def start(self): return @@ -182,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/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..fd06d7f93632a6 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -135,25 +135,16 @@ 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. } @@ -170,13 +161,19 @@ 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 } @@ -212,23 +209,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,9 +240,7 @@ 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): manual_tests = _GetManualTests() flaky_tests = _GetFlakyTests() slow_tests = _GetSlowTests() @@ -272,7 +264,7 @@ def _hardcoded_python_yaml_tests(): if path.name in in_development_tests: tags.add(TestTag.IN_DEVELOPMENT) - if path.name in chip_repl_unsupported_tests: + if treat_repl_unsupported_as_in_development and path.name in chip_repl_unsupported_tests: tags.add(TestTag.IN_DEVELOPMENT) yield TestDefinition( @@ -283,8 +275,13 @@ def _hardcoded_python_yaml_tests(): ) -def AllYamlTests(): - for test in _hardcoded_python_yaml_tests(): +def AllReplYamlTests(): + for test in _AllFoundYamlTests(treat_repl_unsupported_as_in_development=True): + yield test + + +def AllChipToolYamlTests(): + for test in _AllFoundYamlTests(treat_repl_unsupported_as_in_development=False): yield test @@ -295,9 +292,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/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..dc126b4e471314 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)] diff --git a/scripts/tools/summarize_fail.py b/scripts/tools/summarize_fail.py index 90d60ba5860379..7eca296ca201ad 100644 --- a/scripts/tools/summarize_fail.py +++ b/scripts/tools/summarize_fail.py @@ -1,7 +1,93 @@ +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("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 + 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).astype( + str).reset_index(name="Percentage") # Reformat this from "50.0" to "50%" + print("Percentage Frequency of 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)) + -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/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 d2c9b0c54e5d36..e88f5012b4af64 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,14 +23,20 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ { - "id": 48, + "id": 2, "name": "MA-rootdevice", "deviceTypeRef": { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -44,14 +44,14 @@ }, "deviceTypes": [ { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", "name": "MA-powersource" }, { - "id": 55, + "id": 2, "code": 22, "profileId": 259, "label": "MA-rootdevice", @@ -59,8 +59,8 @@ } ], "deviceTypeRefs": [ - 56, - 55 + 3, + 2 ], "deviceVersions": [ 1, @@ -949,7 +949,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -965,7 +965,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -981,7 +981,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -997,7 +997,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1013,7 +1013,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1277,7 +1277,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1293,7 +1293,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1309,7 +1309,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1325,7 +1325,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1761,7 +1761,7 @@ "side": "server", "type": "ProductAppearanceStruct", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1777,7 +1777,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1793,7 +1793,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1809,7 +1809,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1825,7 +1825,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -2289,7 +2289,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2305,7 +2305,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2321,7 +2321,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2337,7 +2337,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2517,7 +2517,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2649,7 +2649,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2665,7 +2665,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2681,7 +2681,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2697,7 +2697,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3407,7 +3407,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3655,7 +3655,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3671,7 +3671,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3687,7 +3687,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3703,7 +3703,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4007,7 +4007,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4023,7 +4023,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4039,7 +4039,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4209,16 +4209,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", @@ -4403,7 +4393,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6473,7 +6463,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6489,7 +6479,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6505,7 +6495,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6521,7 +6511,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6817,7 +6807,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6833,7 +6823,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6849,7 +6839,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6865,7 +6855,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7081,7 +7071,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7097,7 +7087,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7113,7 +7103,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7129,7 +7119,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7928,7 +7918,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8754,7 +8744,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9787,10 +9777,10 @@ ] }, { - "id": 47, + "id": 3, "name": "MA-onofflight", "deviceTypeRef": { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -9798,14 +9788,14 @@ }, "deviceTypes": [ { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -9813,8 +9803,8 @@ } ], "deviceTypeRefs": [ - 61, - 56 + 8, + 3 ], "deviceVersions": [ 1, @@ -9935,7 +9925,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9951,7 +9941,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9967,7 +9957,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9983,7 +9973,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10183,7 +10173,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10199,7 +10189,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10215,7 +10205,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10231,7 +10221,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10551,7 +10541,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10567,7 +10557,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10583,7 +10573,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10599,7 +10589,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10615,7 +10605,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10877,7 +10867,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11679,7 +11669,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11695,7 +11685,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11711,7 +11701,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11727,7 +11717,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11743,7 +11733,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13139,7 +13129,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17319,7 +17309,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18193,7 +18183,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -22512,10 +22502,10 @@ ] }, { - "id": 46, + "id": 1, "name": "MA-onofflight", "deviceTypeRef": { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", @@ -22523,14 +22513,14 @@ }, "deviceTypes": [ { - "id": 61, + "id": 8, "code": 256, "profileId": 259, "label": "MA-onofflight", "name": "MA-onofflight" }, { - "id": 56, + "id": 3, "code": 17, "profileId": 259, "label": "MA-powersource", @@ -22538,8 +22528,8 @@ } ], "deviceTypeRefs": [ - 61, - 56 + 8, + 3 ], "deviceVersions": [ 1, @@ -22660,7 +22650,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22676,7 +22666,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22692,7 +22682,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22708,7 +22698,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22908,7 +22898,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22924,7 +22914,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22940,7 +22930,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22956,7 +22946,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23276,7 +23266,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23292,7 +23282,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23308,7 +23298,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23324,7 +23314,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23340,7 +23330,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23570,7 +23560,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23586,7 +23576,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23602,7 +23592,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23618,7 +23608,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23964,7 +23954,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23980,7 +23970,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -23996,7 +23986,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24012,7 +24002,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -24028,7 +24018,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -25044,7 +25034,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -25727,7 +25717,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -26553,7 +26543,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -26796,10 +26786,10 @@ ] }, { - "id": 45, + "id": 4, "name": "Anonymous Endpoint Type", "deviceTypeRef": { - "id": 106, + "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -26807,7 +26797,7 @@ }, "deviceTypes": [ { - "id": 106, + "id": 53, "code": 61442, "profileId": 259, "label": "MA-secondary-network-commissioning", @@ -26815,7 +26805,7 @@ } ], "deviceTypeRefs": [ - 106 + 53 ], "deviceVersions": [ 1 @@ -27329,4 +27319,4 @@ } ], "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..d3cbd586228952 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 2, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -5406,7 +5432,33 @@ ] }, { + "id": 1, "name": "MA-dimmablelight", + "deviceTypeRef": { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + }, + "deviceTypes": [ + { + "id": 9, + "code": 257, + "profileId": 259, + "label": "MA-dimmablelight", + "name": "MA-dimmablelight" + } + ], + "deviceTypeRefs": [ + 9 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 257 + ], "deviceTypeName": "MA-dimmablelight", "deviceTypeCode": 257, "deviceTypeProfileId": 259, @@ -7241,7 +7293,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8163,7 +8215,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8296,18 +8348,14 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 }, { "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 + "networkId": 0 } ], "log": [] diff --git a/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 b827ad03853187..f8834f17d60bc0 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 @@ -1131,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 */ \ @@ -1666,32 +1666,31 @@ /* Endpoint: 0, Cluster: General Diagnostics (server) */\ /* AcceptedCommandList (index=40) */ \ 0x00000000 /* TestEventTrigger */, \ - 0x00000000 /* TestEventTrigger */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* AcceptedCommandList (index=43) */ \ + /* AcceptedCommandList (index=42) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* AcceptedCommandList (index=45) */ \ + /* AcceptedCommandList (index=44) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* AcceptedCommandList (index=47) */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* AcceptedCommandList (index=49) */ \ + /* AcceptedCommandList (index=48) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Administrator Commissioning (server) */\ - /* AcceptedCommandList (index=51) */ \ + /* AcceptedCommandList (index=50) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=55) */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1701,35 +1700,35 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=64)*/ \ + /* GeneratedCommandList (index=63)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* AcceptedCommandList (index=69) */ \ + /* AcceptedCommandList (index=68) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=74)*/ \ + /* GeneratedCommandList (index=73)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Fault Injection (server) */\ - /* AcceptedCommandList (index=77) */ \ + /* AcceptedCommandList (index=76) */ \ 0x00000000 /* FailAtFault */, \ 0x00000001 /* FailRandomlyAtFault */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=80) */ \ + /* AcceptedCommandList (index=79) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=83) */ \ + /* AcceptedCommandList (index=82) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1737,14 +1736,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=90)*/ \ + /* GeneratedCommandList (index=89)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=95) */ \ + /* AcceptedCommandList (index=94) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1753,7 +1752,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=103)*/ \ + /* GeneratedCommandList (index=102)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1762,7 +1761,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=110) */ \ + /* AcceptedCommandList (index=109) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1771,7 +1770,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=117) */ \ + /* AcceptedCommandList (index=116) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1782,11 +1781,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=126) */ \ + /* AcceptedCommandList (index=125) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* AcceptedCommandList (index=128) */ \ + /* AcceptedCommandList (index=127) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1802,7 +1801,7 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=143)*/ \ + /* GeneratedCommandList (index=142)*/ \ 0x0000000C /* GetWeekDayScheduleResponse */, \ 0x0000000F /* GetYearDayScheduleResponse */, \ 0x0000001C /* GetUserResponse */, \ @@ -1810,7 +1809,7 @@ 0x00000025 /* GetCredentialStatusResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=149) */ \ + /* AcceptedCommandList (index=148) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1820,16 +1819,16 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=157) */ \ + /* AcceptedCommandList (index=156) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=160) */ \ + /* AcceptedCommandList (index=159) */ \ 0x00000000 /* SetpointRaiseLower */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=162) */ \ + /* AcceptedCommandList (index=161) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1851,32 +1850,32 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* AcceptedCommandList (index=182) */ \ + /* AcceptedCommandList (index=181) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=184)*/ \ + /* GeneratedCommandList (index=183)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* AcceptedCommandList (index=186) */ \ + /* AcceptedCommandList (index=185) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=191) */ \ + /* AcceptedCommandList (index=190) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* AcceptedCommandList (index=193) */ \ + /* AcceptedCommandList (index=192) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=195)*/ \ + /* GeneratedCommandList (index=194)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Unit Testing (server) */\ - /* AcceptedCommandList (index=197) */ \ + /* AcceptedCommandList (index=196) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -1896,7 +1895,7 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=216)*/ \ + /* GeneratedCommandList (index=215)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -1908,12 +1907,12 @@ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=226) */ \ + /* AcceptedCommandList (index=225) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=229) */ \ + /* AcceptedCommandList (index=228) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1921,14 +1920,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=236)*/ \ + /* GeneratedCommandList (index=235)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=241) */ \ + /* AcceptedCommandList (index=240) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1937,7 +1936,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=249)*/ \ + /* GeneratedCommandList (index=248)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1946,7 +1945,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=256) */ \ + /* AcceptedCommandList (index=255) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1955,7 +1954,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=263) */ \ + /* AcceptedCommandList (index=262) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1963,7 +1962,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=270)*/ \ + /* GeneratedCommandList (index=269)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -2192,7 +2191,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 12 ), \ .eventCount = 1, \ @@ -2205,7 +2204,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2218,7 +2217,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 13 ), \ .eventCount = 3, \ @@ -2231,7 +2230,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2244,7 +2243,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2257,8 +2256,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2270,8 +2269,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2322,7 +2321,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2335,7 +2334,7 @@ .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( 80 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2348,8 +2347,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2361,8 +2360,8 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 95 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 103 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2374,7 +2373,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( 110 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2400,7 +2399,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 117 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2530,7 +2529,7 @@ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2543,8 +2542,8 @@ .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), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 128 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 143 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 142 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 17 ), \ .eventCount = 4, \ },\ @@ -2556,7 +2555,7 @@ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 149 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 148 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2569,7 +2568,7 @@ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayBarrierControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2595,7 +2594,7 @@ .clusterSize = 31, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 159 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2634,7 +2633,7 @@ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 162 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 161 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2751,8 +2750,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 184 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 181 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 183 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2777,7 +2776,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 186 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2790,7 +2789,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2803,8 +2802,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 195 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2894,8 +2893,8 @@ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 197 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 216 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 21 ), \ .eventCount = 2, \ },\ @@ -2907,7 +2906,7 @@ .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( 226 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2920,8 +2919,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 229 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 236 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 228 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2933,8 +2932,8 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 249 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -2946,7 +2945,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( 256 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 255 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3011,8 +3010,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 263 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 270 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 262 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 269 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ 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_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/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/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..938c158e49ca56 --- /dev/null +++ b/src/app/clusters/air-quality-server/air-quality-server.cpp @@ -0,0 +1,120 @@ +/* + * + * 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, uint32_t 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(AirQualityEnum aFeature) const +{ + return mFeature & to_underlying(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(AirQualityEnum::kFair)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kModerate: { + if (!HasFeature(AirQualityEnum::kModerate)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kPoor: { + if (!HasFeature(AirQualityEnum::kPoor)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + case AirQualityEnum::kExtremelyPoor: { + if (!HasFeature(AirQualityEnum::kExtremelyPoor)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + } + break; + default: + break; + } + + 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; + } + 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..90abf3b17e290a --- /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, uint32_t eFeature); + + ~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(AirQualityEnum) 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; + uint32_t 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..9c4bbeae6bf613 --- /dev/null +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h @@ -0,0 +1,647 @@ +/* + * + * 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 { + +struct DummyType +{ +}; + +/** + * 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 +{ +private: + static const int WINDOW_MAX = 604800; + + EndpointId mEndpointId{}; + ClusterId mClusterId{}; + + // Attribute data store + MeasurementMediumEnum mMeasurementMedium; + std::conditional_t, DummyType> mMeasuredValue; + std::conditional_t, DummyType> mMinMeasuredValue; + std::conditional_t, DummyType> mMaxMeasuredValue; + std::conditional_t mMeasurementUnit; + std::conditional_t mUncertainty; + std::conditional_t, DummyType> mPeakMeasuredValue; + std::conditional_t mPeakMeasuredValueWindow; + std::conditional_t, DummyType> mAverageMeasuredValue; + std::conditional_t mAverageMeasuredValueWindow; + std::conditional_t mLevel; + + uint32_t mFeature = 0; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override + { + switch (aPath.mAttributeId) + { + case Attributes::MeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mMeasuredValue)); + } + break; + + case Attributes::MinMeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mMinMeasuredValue)); + } + break; + + case Attributes::MaxMeasuredValue::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mMaxMeasuredValue)); + } + break; + + case Attributes::Uncertainty::Id: + if constexpr (NumericMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mUncertainty)); + } + break; + + case Attributes::MeasurementUnit::Id: + ReturnErrorOnFailure(aEncoder.Encode(mMeasurementUnit)); + break; + + case Attributes::PeakMeasuredValue::Id: + if constexpr (PeakMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mPeakMeasuredValue)); + } + break; + + case Attributes::PeakMeasuredValueWindow::Id: + if constexpr (PeakMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mPeakMeasuredValueWindow)); + } + break; + + case Attributes::AverageMeasuredValue::Id: + if constexpr (AverageMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mAverageMeasuredValue)); + } + break; + + case Attributes::AverageMeasuredValueWindow::Id: + if constexpr (AverageMeasurementEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mAverageMeasuredValueWindow)); + } + break; + + case Attributes::LevelValue::Id: + if constexpr (LevelIndicationEnabled) + { + ReturnErrorOnFailure(aEncoder.Encode(mLevel)); + } + break; + + case Attributes::MeasurementMedium::Id: + ReturnErrorOnFailure(aEncoder.Encode(mMeasurementMedium)); + 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 is a given value is within the min and max constraints. + * @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. + */ + static bool CheckConstraintMinMax(DataModel::Nullable value, DataModel::Nullable minValue, + DataModel::Nullable maxValue) + { + if (!minValue.IsNull() && !value.IsNull() && (minValue.Value() > value.Value())) + { + return false; + } + + if (!maxValue.IsNull() && !value.IsNull() && (maxValue.Value() < value.Value())) + { + return false; + } + + return true; + }; + + /** + * This checks is a given value is greater than a given value. + * @param value The value to check. + * @param valueToBeGreaterThan The value to be greater than. + * @return true if the value is greater than the given value. + */ + static bool CheckConstraintsGreaterThan(DataModel::Nullable value, DataModel::Nullable valueToBeGreaterThan) + { + if (!valueToBeGreaterThan.IsNull() && !value.IsNull() && (valueToBeGreaterThan.Value() > value.Value())) + { + return false; + } + + return true; + }; + + /** + * This checks is a given value is less than a given value. + * @param value The value to check. + * @param valueToBeLessThan The value to be less than. + * @return true if the value is less than the given value. + */ + static bool CheckConstraintsLessThan(DataModel::Nullable value, DataModel::Nullable valueToBeLessThan) + { + if (!valueToBeLessThan.IsNull() && !value.IsNull() && (valueToBeLessThan.Value() < value.Value())) + { + return false; + } + + return true; + }; + +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), + 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); + + mFeature = GenerateFeatureMap(); + + return CHIP_NO_ERROR; + }; + + CHIP_ERROR SetMeasuredValue(DataModel::Nullable aMeasuredValue) + { + if constexpr (NumericMeasurementEnabled) + { + if (!CheckConstraintMinMax(aMeasuredValue, mMinMeasuredValue, mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + DataModel::Nullable oldValue = mMeasuredValue; + mMeasuredValue = aMeasuredValue; + + if (oldValue != mMeasuredValue) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::MeasuredValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetMinMeasuredValue(DataModel::Nullable aMinMeasuredValue) + { + if constexpr (NumericMeasurementEnabled) + { + if (!CheckConstraintsLessThan(aMinMeasuredValue, mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CheckConstraintsLessThan(aMinMeasuredValue, mMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + DataModel::Nullable oldValue = mMinMeasuredValue; + mMinMeasuredValue = aMinMeasuredValue; + + if (oldValue != mMinMeasuredValue) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::MinMeasuredValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetMaxMeasuredValue(DataModel::Nullable aMaxMeasuredValue) + { + if constexpr (NumericMeasurementEnabled) + { + if (!CheckConstraintsGreaterThan(aMaxMeasuredValue, mMinMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (!CheckConstraintsGreaterThan(aMaxMeasuredValue, mMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + DataModel::Nullable oldValue = mMaxMeasuredValue; + mMaxMeasuredValue = aMaxMeasuredValue; + + if (oldValue != mMaxMeasuredValue) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::MaxMeasuredValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetUncertainty(float aUncertainty) + { + if constexpr (NumericMeasurementEnabled) + { + float oldValue = mUncertainty; + mUncertainty = aUncertainty; + + if (oldValue != mUncertainty) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::Uncertainty::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetPeakMeasuredValue(DataModel::Nullable aPeakMeasuredValue) + { + if constexpr (PeakMeasurementEnabled) + { + if (!CheckConstraintMinMax(aPeakMeasuredValue, mMinMeasuredValue, mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + DataModel::Nullable oldValue = mPeakMeasuredValue; + mPeakMeasuredValue = aPeakMeasuredValue; + + if (oldValue != mPeakMeasuredValue) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::PeakMeasuredValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetPeakMeasuredValueWindow(uint32_t aPeakMeasuredValueWindow) + { + if constexpr (PeakMeasurementEnabled) + { + if (aPeakMeasuredValueWindow > WINDOW_MAX) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + uint32_t oldValue = mPeakMeasuredValueWindow; + mPeakMeasuredValueWindow = aPeakMeasuredValueWindow; + + if (oldValue != mPeakMeasuredValueWindow) + { + ConcreteAttributePath path = + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::PeakMeasuredValueWindow::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetAverageMeasuredValue(DataModel::Nullable aAverageMeasuredValue) + { + if constexpr (AverageMeasurementEnabled) + { + if (!CheckConstraintMinMax(aAverageMeasuredValue, mMinMeasuredValue, mMaxMeasuredValue)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + DataModel::Nullable oldValue = mAverageMeasuredValue; + mAverageMeasuredValue = aAverageMeasuredValue; + + if (oldValue != mAverageMeasuredValue) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::AverageMeasuredValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetAverageMeasuredValueWindow(uint32_t aAverageMeasuredValueWindow) + { + if constexpr (AverageMeasurementEnabled) + { + if (aAverageMeasuredValueWindow > WINDOW_MAX) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + uint32_t oldValue = mAverageMeasuredValueWindow; + mAverageMeasuredValueWindow = aAverageMeasuredValueWindow; + + if (oldValue != mAverageMeasuredValueWindow) + { + ConcreteAttributePath path = + ConcreteAttributePath(mEndpointId, mClusterId, Attributes::AverageMeasuredValueWindow::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; + + CHIP_ERROR SetLevelValue(LevelValueEnum aLevel) + { + if constexpr (LevelIndicationEnabled) + { + if constexpr (!MediumLevelEnabled) + { + if (aLevel == LevelValueEnum::kMedium) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + if constexpr (!CriticalLevelEnabled) + { + if (aLevel == LevelValueEnum::kCritical) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + LevelValueEnum oldValue = mLevel; + mLevel = aLevel; + + if (oldValue != mLevel) + { + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, mClusterId, Attributes::LevelValue::Id); + MatterReportingAttributeChangeCallback(path); + } + + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } + }; +}; + +/** + * 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/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index ad201e78cf7d2f..a9b3cdd4dc106d 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -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..b61d2c34156570 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -123,6 +123,137 @@ 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; + pairs[0].attributeValue = (!level.IsNull()) ? level.Value() : maxLevel + 1; + 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 +577,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 +613,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 +1445,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..16a7e60664d658 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,13 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl return err; } - OnOffServer::Instance().scheduleTimerCallbackMs(sceneEventControl(endpoint), timeMs); +#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 +598,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..ea8ecd3df1f06f 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -136,7 +136,7 @@ void Instance::OnOperationalErrorDetected(const Structs::ErrorStateStruct::Type } // 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); 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..67c927c202730d 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,25 +43,6 @@ 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) { @@ -102,379 +84,322 @@ void SmokeCoAlarmServer::SetExpressedStateByPriority(EndpointId endpointId, if ((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); - } + VerifyOrReturnValue(GetAttribute(endpointId, SmokeState::Id, SmokeState::Get, alarmState), false); + VerifyOrReturnValue(alarmState != AlarmStateEnum::kCritical, 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); - } - } + VerifyOrReturnValue(GetAttribute(endpointId, COState::Id, COState::Get, alarmState), false); + VerifyOrReturnValue(alarmState != AlarmStateEnum::kCritical, false); + + VerifyOrReturnValue(GetAttribute(endpointId, BatteryAlert::Id, BatteryAlert::Get, alarmState), false); + VerifyOrReturnValue(alarmState != AlarmStateEnum::kCritical, false); + + VerifyOrReturnValue(GetAttribute(endpointId, InterconnectSmokeAlarm::Id, InterconnectSmokeAlarm::Get, alarmState), false); + VerifyOrReturnValue(alarmState != AlarmStateEnum::kCritical, false); + + VerifyOrReturnValue(GetAttribute(endpointId, InterconnectCOAlarm::Id, InterconnectCOAlarm::Get, alarmState), false); + VerifyOrReturnValue(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 +411,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 @@ -573,7 +499,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 f3a2d203c824fe..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); 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 ae657fa51d0404..54b0bb5062286f 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -84,12 +84,16 @@ 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 || CanBeSynced()))); + ((now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || CanBeSynced())) || + IsEngineRunScheduled())); } bool IsEngineRunScheduled() const { return mFlags.Has(ReadHandlerNodeFlags::EngineRunScheduled); } @@ -114,8 +118,8 @@ class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver void TimerFired() override { - mScheduler->ReportTimerCallback(); SetEngineRunScheduled(true); + mScheduler->ReportTimerCallback(); } System::Clock::Timestamp GetMinTimestamp() const { return mMinTimestamp; } diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index 41d80cc7114ae6..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() @@ -98,9 +100,10 @@ void ReportSchedulerImpl::OnSubscriptionReportSent(ReadHandler * aReadHandler) 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 ddb8bb7b1c4149..55992e35febd24 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp @@ -44,6 +44,19 @@ 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 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..cbc7c44e7fb6f8 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; @@ -112,15 +108,6 @@ void CommissioningWindowManager::ResetState() 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 +236,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(); } diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 1fabd26bd6827d..fae3c075f5b518 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -215,10 +215,6 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, 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.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/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/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 03bf2319f493d9..56b63a9d385cfe 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -50,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 @@ -83,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/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/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/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 2785ad6e7f8bc5..76db6c83d37f08 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -1774,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 # @@ -1790,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 # @@ -1856,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 # @@ -2862,7 +2894,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 @@ -3610,6 +3642,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 # @@ -8772,19 +8841,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 @@ -8930,10 +8986,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 @@ -9012,21 +9076,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: @@ -9103,6 +9182,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 @@ -9161,10 +9243,18 @@ PICS: - 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: 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 56cae49a569db6..2d5b61e4e3c3cd 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 @@ -143,51 +143,7 @@ tests: type: list contains: [5] - #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 activatedcarbonfiltermonitoring read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0002, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0003 - - Based on feature support:- 0x0000, 0x0001 - - [1685958590.636044][11442:11444] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0072 Attribute 0x0000_FFFB DataVersion: 403478864 - [1690179748.767756][7924:7926] CHIP:TOO: AttributeList: 12 entries - [1690179748.767825][7924:7926] CHIP:TOO: [1]: 0 - [1690179748.767885][7924:7926] CHIP:TOO: [2]: 1 - [1690179748.767943][7924:7926] CHIP:TOO: [3]: 2 - [1690179748.767999][7924:7926] CHIP:TOO: [4]: 3 - [1690179748.768056][7924:7926] CHIP:TOO: [5]: 4 - [1690179748.768112][7924:7926] CHIP:TOO: [6]: 5 - [1690179748.768170][7924:7926] CHIP:TOO: [7]: 65528 - [1690179748.768227][7924:7926] CHIP:TOO: [8]: 65529 - [1690179748.768283][7924:7926] CHIP:TOO: [9]: 65530 - [1690179748.768340][7924:7926] CHIP:TOO: [10]: 65531 - [1690179748.768397][7924:7926] CHIP:TOO: [11]: 65532 - [1690179748.768454][7924:7926] CHIP:TOO: [12]: 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: TH reads EventList attribute from DUT" + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -196,36 +152,7 @@ tests: constraints: type: list - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 activatedcarbonfiltermonitoring read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685958846.723249][11454:11456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0072 Attribute 0x0000_FFFA DataVersion: 403478864 - [1685958846.723431][11454:11456] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - 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" @@ -235,7 +162,7 @@ tests: type: list - label: - "Step 6a: Read the optional command (ResetCondition) in + "Step 6: Read the optional command (ResetCondition) in AcceptedCommandList" PICS: ACFREMON.S.C00.Rsp command: "readAttribute" @@ -245,69 +172,10 @@ tests: type: list contains: [0] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 6b: TH reads from the DUT the AcceptedCommandList attribute. - 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 activatedcarbonfiltermonitoring read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685959114.395290][11468:11470] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0072 Attribute 0x0000_FFF9 DataVersion: 403478864 - [1685959114.395414][11468:11470] CHIP:TOO: AcceptedCommandList: 0 entries - [1690183785.805331][8169:8171] CHIP:TOO: [1]: 0 - 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: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 7b: TH reads from the DUT the GeneratedCommandList attribute. - 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 activatedcarbonfiltermonitoring read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685959192.277991][11472:11474] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0072 Attribute 0x0000_FFF8 DataVersion: 403478864 - [1685959192.278115][11472:11474] 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" 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 f0d11108473f9a..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 @@ -74,47 +74,7 @@ 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 5a: TH reads EventList attribute from DUT" + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -123,107 +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 - - Via the TH (chip-tool), verify: - -that EventList attribute contains list of supported events. - -that list has two entries as value of 0 and 1 (if SAccessControlEntryChanged and AccessControlExtensionChanged event is supported). - - [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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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..cd77adbe3b1bff 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" 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..61a98cd52ddb95 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" 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 f4f7fb1bb43081..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,6 +74,7 @@ tests: type: list contains: [2] + #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 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 old mode 100644 new mode 100755 index 5be7d63eb82bd6..ea44aa586a99d9 --- 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,7 +447,7 @@ 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: 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_AIRQUAL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml index 7f7621b75a50d6..bf8419269d26a5 100644 --- a/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.yaml @@ -93,7 +93,7 @@ tests: type: bitmap32 hasMasksSet: [0x8] - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4: Read the global attribute: AttributeList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -102,7 +102,7 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4: Read the global attribute: AttributeList" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -111,45 +111,7 @@ 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 from the DUT the AttributeList attribute. 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 airquality 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. - - [1685258693.808637][110898:110900] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005B Attribute 0x0000_FFFB DataVersion: 3241788930 - [1685258693.808679][110898:110900] CHIP:TOO: AttributeList: 7 entries - [1685258693.808703][110898:110900] CHIP:TOO: [1]: 0 - [1685258693.808711][110898:110900] CHIP:TOO: [2]: 65528 - [1685258693.808718][110898:110900] CHIP:TOO: [3]: 65529 - [1685258693.808725][110898:110900] CHIP:TOO: [4]: 65530 - [1685258693.808733][110898:110900] CHIP:TOO: [5]: 65531 - [1685258693.808743][110898:110900] CHIP:TOO: [6]: 65532 - [1685258693.808752][110898:110900] CHIP:TOO: [7]: 65533 - [1685258693.808831][110898:110900] CHIP:EM: <<< [E:31713i S:23166 M:213128168 (Ack:192433969)] (S) Msg TX to 1:0000000000000001 [BFD3] --- Type 0000:10 (SecureChannel:StandaloneAck) - 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: TH reads EventList attribute from DUT" + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -158,36 +120,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 airquality read event-list 1 1 - - On TH(Chip-tool), verify the Event-list value is 0 entries - - [1685259470.356105][111277:111279] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005B Attribute 0x0000_FFFA DataVersion: 3241788930 - [1685259470.356143][111277:111279] CHIP:TOO: EventList: 0 entries - [1685259470.356213][111277:111279] CHIP:EM: <<< [E:2990i S:55081 M:20552289 (Ack:224151602)] (S) Msg TX to 1:0000000000000001 [BFD3] --- Type 0000:10 (SecureChannel:StandaloneAck) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -195,72 +128,10 @@ tests: type: list contains: [] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 6b: TH reads from the DUT the AcceptedCommandList attribute. - 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 airquality read accepted-command-list 1 1 - - ON TH(Chip-tool) verify the Accepted-command-list value is 0 entries - - - [1685259569.647040][111317:111320] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005B Attribute 0x0000_FFF9 DataVersion: 3241788930 - [1685259569.647067][111317:111320] CHIP:TOO: AcceptedCommandList: 0 entries - [1685259569.647126][111317:111320] CHIP:EM: <<< [E:53927i S:47055 M:265148451 (Ack:221551330)] (S) Msg TX to 1:0000000000000001 [BFD3] --- Type 0000:10 (SecureChannel:StandaloneAck) - 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: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 7b: TH reads from the DUT the GeneratedCommandList attribute. - 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 airquality read accepted-command-list 1 1 - - ON TH(Chip-tool) verify the Accepted-command-list value is 0 entries - - - [1685259569.647040][111317:111320] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_005B Attribute 0x0000_FFF9 DataVersion: 3241788930 - [1685259569.647067][111317:111320] CHIP:TOO: AcceptedCommandList: 0 entries - [1685259569.647126][111317:111320] CHIP:EM: <<< [E:53927i S:47055 M:265148451 (Ack:221551330)] (S) Msg TX to 1:0000000000000001 [BFD3] --- Type 0000:10 (SecureChannel:StandaloneAck) - 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_BIND_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_1_1.yaml index d9f3ce1c885008..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 @@ -47,7 +47,7 @@ tests: constraints: type: bitmap32 - - 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" @@ -56,7 +56,7 @@ tests: type: list contains: [0, 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" @@ -65,122 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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_BINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index fdf891bbc0791f..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 @@ -185,63 +184,7 @@ 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 - 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: " !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED" @@ -288,86 +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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 63e238f760b461..87405f6168ad3e 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 @@ -220,45 +220,6 @@ tests: type: list contains: [18] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4p: 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 bridgeddevicebasicinformation read attribute-list 1 3 - - Via the TH (chip-tool), verify: - - that AttributeList attribute contains list of supported attributes. - -that the list has mandatory attribute(Reachable attribute), optional attributes and Global attributes. - - [1676277997.061046][3751:3753] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFB DataVersion: 1860081282 - [1676277997.061134][3751:3753] CHIP:TOO: AttributeList: 8 entries - [1676277997.061192][3751:3753] CHIP:TOO: [1]: 5 - [1676277997.061220][3751:3753] CHIP:TOO: [2]: 17 - [1676277997.061245][3751:3753] CHIP:TOO: [3]: 65528 - [1676277997.061274][3751:3753] CHIP:TOO: [4]: 65529 - [1676277997.061306][3751:3753] CHIP:TOO: [5]: 65530 - [1676277997.061337][3751:3753] CHIP:TOO: [6]: 65531 - [1676277997.061367][3751:3753] CHIP:TOO: [7]: 65532 - [1676277997.061399][3751:3753] CHIP:TOO: [8]: 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: TH reads optional event(StartUp) in EventList" PICS: BRBINFO.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -286,37 +247,7 @@ tests: type: list contains: [2] - - label: - "Step 5d: 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 bridgeddevicebasicinformation read event-list 1 3 - - Via the TH (chip-tool), verify: - -that EventList attribute contains list of supported events. - -that list has empty (0 entries) for this cluster. - - 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: TH1 reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -324,67 +255,10 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 bridgeddevicebasicinformation read accepted-command-list 1 3 - - Via the TH (chip-tool), verify: - -that AcceptedCommandList attribute contains list of supported commands. - -that list has empty (0 entries) for this cluster. - - [1657696300.165081][15447:15452] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFF9 DataVersion: 2577979325 - [1657696300.165174][15447:15452] 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 7a: TH1 reads GeneratedCommandList from DUT" + - label: "Step 7: TH1 reads GeneratedCommandList from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 7b: TH1 reads GeneratedCommandList 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 bridgeddevicebasicinformation read generated-command-list 1 3 - - Via the TH (chip-tool), verify: - -that GeneratedCommandList attribute contains list of supported commands. - -that list has empty (0 entries) for this cluster. - - [1657696328.889936][15454:15459] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFF8 DataVersion: 2577979325 - [1657696328.890017][15454:15459] 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" 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..15d01deed0434d 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: @@ -6885,39 +6044,39 @@ tests: 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] + 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] 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_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_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml index 4f020eaecd679e..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 @@ -313,56 +310,7 @@ tests: type: list excludes: [10] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 carbondioxideconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009,0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000,0x0001.0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x000a - - [1685960397.210408][11541:11543] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040D Attribute 0x0000_FFFB DataVersion: 832916414 - [1685960397.210558][11541:11543] CHIP:TOO: AttributeList: 17 entries - [1685960397.210606][11541:11543] CHIP:TOO: [1]: 0 - [1685960397.210646][11541:11543] CHIP:TOO: [2]: 1 - [1685960397.210684][11541:11543] CHIP:TOO: [3]: 2 - [1685960397.210721][11541:11543] CHIP:TOO: [4]: 3 - [1685960397.210760][11541:11543] CHIP:TOO: [5]: 4 - [1685960397.210797][11541:11543] CHIP:TOO: [6]: 5 - [1685960397.210835][11541:11543] CHIP:TOO: [7]: 6 - [1685960397.210872][11541:11543] CHIP:TOO: [8]: 7 - [1685960397.210909][11541:11543] CHIP:TOO: [9]: 8 - [1685960397.210948][11541:11543] CHIP:TOO: [10]: 9 - [1685960397.210986][11541:11543] CHIP:TOO: [11]: 10 - [1685960397.211025][11541:11543] CHIP:TOO: [12]: 65528 - [1685960397.211064][11541:11543] CHIP:TOO: [13]: 65529 - [1685960397.211102][11541:11543] CHIP:TOO: [14]: 65530 - [1685960397.211141][11541:11543] CHIP:TOO: [15]: 65531 - [1685960397.211179][11541:11543] CHIP:TOO: [16]: 65532 - [1685960397.211217][11541:11543] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -371,34 +319,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 carbondioxideconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960313.959334][11536:11538] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040D Attribute 0x0000_FFFA DataVersion: 832916414 - [1685960313.959445][11536:11538] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,64 +327,10 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 carbondioxideconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that theAcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960703.799496][11550:11552] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040D Attribute 0x0000_FFF9 DataVersion: 832916414 - [1685960703.799652][11550:11552] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 carbondioxideconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that theGeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960779.325075][11556:11558] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040D Attribute 0x0000_FFF8 DataVersion: 832916414 - [1685960779.325258][11556:11558] 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" 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 c01ac0d8fb20fc..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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 carbonmonoxideconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that theAttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1685965930.706971][11849:11851] CHIP:TOO: AttributeList: 17 entries - [1685965930.707011][11849:11851] CHIP:TOO: [1]: 0 - [1685965930.707045][11849:11851] CHIP:TOO: [2]: 1 - [1685965930.707076][11849:11851] CHIP:TOO: [3]: 2 - [1685965930.707107][11849:11851] CHIP:TOO: [4]: 3 - [1685965930.707138][11849:11851] CHIP:TOO: [5]: 4 - [1685965930.707169][11849:11851] CHIP:TOO: [6]: 5 - [1685965930.707200][11849:11851] CHIP:TOO: [7]: 6 - [1685965930.707231][11849:11851] CHIP:TOO: [8]: 7 - [1685965930.707262][11849:11851] CHIP:TOO: [9]: 8 - [1685965930.707293][11849:11851] CHIP:TOO: [10]: 9 - [1685965930.707324][11849:11851] CHIP:TOO: [11]: 10 - [1685965930.707356][11849:11851] CHIP:TOO: [12]: 65528 - [1685965930.707387][11849:11851] CHIP:TOO: [13]: 65529 - [1685965930.707418][11849:11851] CHIP:TOO: [14]: 65530 - [1685965930.707449][11849:11851] CHIP:TOO: [15]: 65531 - [1685965930.707480][11849:11851] CHIP:TOO: [16]: 65532 - [1685965930.707511][11849:11851] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -370,36 +319,7 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 carbonmonoxideconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that theEventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040C Attribute 0x0000_FFFA DataVersion: 2062554595 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -407,63 +327,10 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 carbonmonoxideconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that theAcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040C Attribute 0x0000_FFF9 DataVersion: 2062554595 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 7b: TH1 reads GeneratedCommandList 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 carbonmonoxideconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that theGeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_040C Attribute 0x0000_FFF8 DataVersion: 2062554595 - [1685966085.385829][11867:11869] 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" 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 76f25e442c61b4..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 @@ -123,127 +123,14 @@ 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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: | - Onnetwork - ./chip-tool networkcommissioning read event-list 1 0 - - Via the TH (chip-tool), verify: - -that EventList attribute contains list of supported events. - -that list has empty (0 entries) for this cluster. - - [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 && PICS_EVENT_LIST_ENABLED - 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 @@ -287,64 +174,6 @@ tests: response: value: [] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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)" @@ -364,60 +193,3 @@ tests: attribute: "GeneratedCommandList" response: value: [] - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" 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 59afd050075034..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,35 +31,35 @@ tests: - name: "nodeId" value: nodeId - #Issue: https://github.com/project-chip/connectedhomeip/issues/26599 - - label: "Step 2: Read the global attribute: ClusterRevision" - verification: | - ./chip-tool descriptor read cluster-revision 1 0 - - Verify "ClusterRevision" value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 2 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 2 + constraints: + type: int16u - [1649425080.347625][3458:3463] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_FFFD DataVersion: 3183189461 - [1649425080.347719][3458:3463] CHIP:TOO: ClusterRevision: 1 - [1649425080.347822][3458:3463] CHIP:EM: Sending Standalone Ack for MessageCounter:1458141 on exchange 62716i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - label: "Step 3: TH reads from the DUT the FeatureMap attribute." + PICS: "!DESC.S.F00" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksClear: [0x1] - - label: "Step 3: Read the global attribute: FeatureMap" + - 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: - value: 0 constraints: type: bitmap32 + hasMasksSet: [0x1] - - 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" @@ -69,7 +68,7 @@ tests: type: list contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] - - 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" @@ -78,125 +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 from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - 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..b95c22cf3e2c4d 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 @@ -132,79 +132,77 @@ tests: 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 + [1692618512.334390][31683:31685] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 2832593371 + [1692618512.334424][31683:31685] CHIP:TOO: ServerList: 69 entries + [1692618512.334429][31683:31685] CHIP:TOO: [1]: 3 + [1692618512.334432][31683:31685] CHIP:TOO: [2]: 4 + [1692618512.334435][31683:31685] CHIP:TOO: [3]: 5 + [1692618512.334438][31683:31685] CHIP:TOO: [4]: 6 + [1692618512.334441][31683:31685] CHIP:TOO: [5]: 7 + [1692618512.334443][31683:31685] CHIP:TOO: [6]: 8 + [1692618512.334446][31683:31685] CHIP:TOO: [7]: 15 + [1692618512.334449][31683:31685] CHIP:TOO: [8]: 29 + [1692618512.334452][31683:31685] CHIP:TOO: [9]: 30 + [1692618512.334455][31683:31685] CHIP:TOO: [10]: 37 + [1692618512.334458][31683:31685] CHIP:TOO: [11]: 47 + [1692618512.334461][31683:31685] CHIP:TOO: [12]: 59 + [1692618512.334464][31683:31685] CHIP:TOO: [13]: 64 + [1692618512.334467][31683:31685] CHIP:TOO: [14]: 65 + [1692618512.334469][31683:31685] CHIP:TOO: [15]: 69 + [1692618512.334472][31683:31685] CHIP:TOO: [16]: 80 + [1692618512.334475][31683:31685] CHIP:TOO: [17]: 81 + [1692618512.334478][31683:31685] CHIP:TOO: [18]: 82 + [1692618512.334481][31683:31685] CHIP:TOO: [19]: 84 + [1692618512.334483][31683:31685] CHIP:TOO: [20]: 85 + [1692618512.334486][31683:31685] CHIP:TOO: [21]: 86 + [1692618512.334489][31683:31685] CHIP:TOO: [22]: 87 + [1692618512.334492][31683:31685] CHIP:TOO: [23]: 89 + [1692618512.334495][31683:31685] CHIP:TOO: [24]: 91 + [1692618512.334498][31683:31685] CHIP:TOO: [25]: 92 + [1692618512.334501][31683:31685] CHIP:TOO: [26]: 93 + [1692618512.334504][31683:31685] CHIP:TOO: [27]: 96 + [1692618512.334506][31683:31685] CHIP:TOO: [28]: 97 + [1692618512.334509][31683:31685] CHIP:TOO: [29]: 113 + [1692618512.334512][31683:31685] CHIP:TOO: [30]: 114 + [1692618512.334515][31683:31685] CHIP:TOO: [31]: 257 + [1692618512.334517][31683:31685] CHIP:TOO: [32]: 258 + [1692618512.334520][31683:31685] CHIP:TOO: [33]: 259 + [1692618512.334523][31683:31685] CHIP:TOO: [34]: 512 + [1692618512.334526][31683:31685] CHIP:TOO: [35]: 513 + [1692618512.334529][31683:31685] CHIP:TOO: [36]: 514 + [1692618512.334532][31683:31685] CHIP:TOO: [37]: 516 + [1692618512.334535][31683:31685] CHIP:TOO: [38]: 768 + [1692618512.334538][31683:31685] CHIP:TOO: [39]: 769 + [1692618512.334541][31683:31685] CHIP:TOO: [40]: 1024 + [1692618512.334543][31683:31685] CHIP:TOO: [41]: 1026 + [1692618512.334546][31683:31685] CHIP:TOO: [42]: 1027 + [1692618512.334549][31683:31685] CHIP:TOO: [43]: 1028 + [1692618512.334552][31683:31685] CHIP:TOO: [44]: 1029 + [1692618512.334555][31683:31685] CHIP:TOO: [45]: 1030 + [1692618512.334558][31683:31685] CHIP:TOO: [46]: 1036 + [1692618512.334560][31683:31685] CHIP:TOO: [47]: 1037 + [1692618512.334563][31683:31685] CHIP:TOO: [48]: 1043 + [1692618512.334566][31683:31685] CHIP:TOO: [49]: 1045 + [1692618512.334569][31683:31685] CHIP:TOO: [50]: 1066 + [1692618512.334572][31683:31685] CHIP:TOO: [51]: 1067 + [1692618512.334575][31683:31685] CHIP:TOO: [52]: 1068 + [1692618512.334578][31683:31685] CHIP:TOO: [53]: 1069 + [1692618512.334580][31683:31685] CHIP:TOO: [54]: 1070 + [1692618512.334583][31683:31685] CHIP:TOO: [55]: 1071 + [1692618512.334586][31683:31685] CHIP:TOO: [56]: 1283 + [1692618512.334589][31683:31685] CHIP:TOO: [57]: 1284 + [1692618512.334592][31683:31685] CHIP:TOO: [58]: 1285 + [1692618512.334595][31683:31685] CHIP:TOO: [59]: 1286 + [1692618512.334597][31683:31685] CHIP:TOO: [60]: 1287 + [1692618512.334600][31683:31685] CHIP:TOO: [61]: 1288 + [1692618512.334603][31683:31685] CHIP:TOO: [62]: 1289 + [1692618512.334606][31683:31685] CHIP:TOO: [63]: 1290 + [1692618512.334609][31683:31685] CHIP:TOO: [64]: 1291 + [1692618512.334612][31683:31685] CHIP:TOO: [65]: 1292 + [1692618512.334614][31683:31685] CHIP:TOO: [66]: 1293 + [1692618512.334617][31683:31685] CHIP:TOO: [67]: 1294 + [1692618512.334620][31683:31685] CHIP:TOO: [68]: 2820 + [1692618512.334623][31683:31685] CHIP:TOO: [69]: 4294048773 disabled: true - label: "Step 3: TH reads 'ClientList' attribute" @@ -243,8 +241,23 @@ tests: [1672919326.178777][33468:33470] CHIP:TOO: [2]: 2 disabled: true - - label: "Step 5: TH reads from the DUT the 'TagList' attribute." + - label: "Step 6: 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: + + [1692930031.171338][161314:161316] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0004 DataVersion: 3040764429 + [1692930031.171357][161314:161316] CHIP:TOO: TagList: 2 entries + [1692930031.171384][161314:161316] CHIP:TOO: [1]: { + [1692930031.171389][161314:161316] CHIP:TOO: MfgCode: null + [1692930031.171392][161314:161316] CHIP:TOO: NamespaceID: 7 + [1692930031.171394][161314:161316] CHIP:TOO: Tag: 0 + [1692930031.171396][161314:161316] CHIP:TOO: } + [1692930031.171399][161314:161316] CHIP:TOO: [2]: { + [1692930031.171410][161314:161316] CHIP:TOO: MfgCode: null + [1692930031.171413][161314:161316] CHIP:TOO: NamespaceID: 8 + [1692930031.171425][161314:161316] CHIP:TOO: Tag: 3 + [1692930031.171427][161314:161316] CHIP:TOO: } 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 9506cc4abf3c31..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 @@ -180,82 +180,16 @@ 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - 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" + - label: "Step 6: TH reads AcceptedCommandList from DUT" PICS: ( DGETH.S.F00 || DGETH.S.F01 ) command: "readAttribute" attribute: "AcceptedCommandList" @@ -264,7 +198,7 @@ tests: type: list contains: [0] - - label: "Step 6b: TH reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" PICS: " !DGETH.S.F00 && !DGETH.S.F01 " command: "readAttribute" attribute: "AcceptedCommandList" @@ -273,58 +207,10 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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 ab8b23246903d0..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 @@ -127,50 +126,6 @@ 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 - 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 command: "readAttribute" @@ -207,40 +162,7 @@ tests: type: list contains: [2] - - label: - "Step 5e: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -248,60 +170,10 @@ tests: type: list contains: [0] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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_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 fe83bf51609e1b..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 @@ -121,46 +121,6 @@ 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 5a: TH reads EventList from DUT" PICS: DGSW.S.E00 && PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -179,36 +139,7 @@ tests: constraints: type: list - - label: - "Step 5c: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - 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" PICS: DGSW.S.F00 command: "readAttribute" attribute: "AcceptedCommandList" @@ -217,7 +148,7 @@ tests: type: list contains: [0] - - label: "Step 6b: TH reads AcceptedCommandList from DUT" + - label: "Step 6: TH reads AcceptedCommandList from DUT" PICS: " !DGSW.S.F00 " command: "readAttribute" attribute: "AcceptedCommandList" @@ -225,58 +156,11 @@ tests: value: [] constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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 2f2564ba64e77b..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] @@ -292,38 +291,7 @@ tests: type: list contains: [1] - - label: - "Step 5d: TH reads from the DUT the EventList attribute. 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 threadnetworkdiagnostics read event-list 54 0 - - Verify " EventList attribute " consists the list of supported events, on TH(chip-tool) - - 1676459946.528321][25797:25799] CHIP:DMG: } - [1676459946.528472][25797:25799] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFFA DataVersion: 3757870882 - [1676459946.528508][25797:25799] CHIP:TOO: EventList: 0 entries - [1676459946.528588][25797:25799] CHIP:EM: <<< [E:39264i S:15932 M:176950481 (Ack:89396356)] (S) Msg TX to 1:0000000000000001 [110F] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1676459946.528602][25797:25799] CHIP:IN: (S) Sending msg 176950481 on secure session with LSID: 15932 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - 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" PICS: " !DGTHREAD.S.F01 " command: "readAttribute" attribute: "AcceptedCommandList" @@ -332,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" @@ -341,71 +309,10 @@ tests: type: list contains: [0] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 6c: 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 threadnetworkdiagnostics read accepted-command-list 54 0 - - Verify "AcceptedCommandList: 1 entries" on the TH(Chip-tool) Log: - - [1649748231.835572][9579:9584] CHIP:DMG: SuppressResponse = true, - [1649748231.835633][9579:9584] CHIP:DMG: InteractionModelRevision = 1 - [1649748231.835690][9579:9584] CHIP:DMG: } - [1649748231.836192][9579:9584] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFF9 DataVersion: 1406212801 - [1649748231.836344][9579:9584] CHIP:TOO: AcceptedCommandList: 1 entries - [1649748231.836420][9579:9584] CHIP:TOO: [1]: 0 - 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: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 threadnetworkdiagnostics read generated-command-list 54 0 - - Verify "GeneratedCommandList: 0 entries" on the TH(Chip-tool) Log: - - [1649748201.118100][9570:9575] CHIP:DMG: SuppressResponse = true, - [1649748201.118163][9570:9575] CHIP:DMG: InteractionModelRevision = 1 - [1649748201.118221][9570:9575] CHIP:DMG: } - [1649748201.118561][9570:9575] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0035 Attribute 0x0000_FFF8 DataVersion: 1406212801 - [1649748201.118707][9570:9575] 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" 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 e6889393400d8c..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: @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "Step 3: TTH reads the FeatureMap from DUT" + - label: "Step 3: TH reads the FeatureMap from DUT" command: "readAttribute" attribute: "FeatureMap" response: @@ -47,7 +47,7 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: TTH reads AttributeList from DUT" + - label: "Step 4: TH reads AttributeList from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -56,7 +56,7 @@ tests: type: list contains: [65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4a: TTH reads AttributeList from DUT" + - label: "Step 4: TH reads AttributeList from DUT" PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -65,73 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - 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" + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -139,70 +82,10 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 7a: TTH reads GeneratedCommandList from DUT" + - label: "Step 7: TH reads GeneratedCommandList from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [1] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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 ace9293841b932..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] 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 index ecd16a23b216fd..d1f05401eeb4ea 100755 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -35,6 +35,104 @@ 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" + 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" + 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" @@ -63,7 +161,16 @@ tests: value: LockStateValue - label: "Step 1d: TH sends a Lock Door command to the DUT." - PICS: DRLK.S.C00.Rsp + 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 command: "LockDoor" timedInteractionTimeoutMs: 1000 @@ -84,10 +191,19 @@ tests: value: 1 - label: "Step 1e: TH sends a Unlock Door command to the DUT." - PICS: DRLK.S.C01.Rsp + PICS: DRLK.S.C01.Rsp && !DRLK.S.F00 && !DRLK.S.F07 command: "UnlockDoor" timedInteractionTimeoutMs: 1000 + - label: "Step 1e: TH sends a Unlock Door command to the DUT." + PICS: DRLK.S.C01.Rsp && DRLK.S.F00 && DRLK.S.F07 + command: "UnlockDoor" + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "PINCode" + value: "123456" + - label: "Wait after Unlock Door" PICS: DRLK.S.C00.Rsp cluster: "DelayCommands" @@ -840,7 +956,7 @@ tests: verification: | ./chip-tool doorlock write-by-id 38 0 1 1 - Verify " DUT responds with UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: + Via the TH (chip-tool), verify the UNSUPPORTED_WRITE response for Supported OperatingModes attribute write functionality. [1653637108.039160][3522:3527] CHIP:DMG: StatusIB = [1653637108.039205][3522:3527] CHIP:DMG: { @@ -957,7 +1073,7 @@ tests: ./chip-tool doorlock write-by-id 39 1 1 1 - Verify "DUT responds with UNSUPPORTED_WRITE " on the TH(Chip-tool) Log: + Via the TH (chip-tool), verify the UNSUPPORTED_WRITE response for Default ConfigurationRegister attribute write functionality. [1653637348.333879][3570:3575] CHIP:DMG: StatusIB = [1653637348.333920][3570:3575] CHIP:DMG: { @@ -991,8 +1107,9 @@ tests: command: "readAttribute" attribute: "EnableLocalProgramming" response: - value: 1 saveAs: Current_EnableLocal_Programming + constraints: + type: boolean - label: "Step 26b: TH writes EnableLocalProgramming attribute as false" PICS: DRLK.S.A0028.Write @@ -1029,7 +1146,8 @@ tests: command: "readAttribute" attribute: "EnableOneTouchLocking" response: - value: 0 + constraints: + type: boolean - label: "Step 27b: TH writes EnableOneTouchLocking attribute as true" PICS: DRLK.S.A0029 @@ -1050,7 +1168,8 @@ tests: command: "readAttribute" attribute: "EnableInsideStatusLED" response: - value: 0 + constraints: + type: boolean - label: "Step 28b: TH writes EnableInsideStatusLED attribute as true" PICS: DRLK.S.A002a @@ -1071,7 +1190,8 @@ tests: command: "readAttribute" attribute: "EnablePrivacyModeButton" response: - value: 0 + constraints: + type: boolean - label: "Step 29b: TH writes EnablePrivacy ModeButton attribute as true" PICS: DRLK.S.A002b @@ -1301,8 +1421,9 @@ tests: command: "readAttribute" attribute: "RequirePINforRemoteOperation" response: - value: 0 saveAs: Current_RequirePINFor_RemoteOperation + constraints: + type: boolean - label: "Step 33b: TH writes RequirePINfor RemoteOperation attribute as true" @@ -1411,3 +1532,21 @@ tests: attribute: "NumberOfCredentialsSupportedPerUser" response: value: NumberOfCredentialsSupportedPerUserValue + + - 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: + values: + - name: "Credential" + value: { CredentialType: 1, CredentialIndex: 1 } 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_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 6b278a1a7ea1c2..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,57 +178,7 @@ tests: type: list contains: [11] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 3f: 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 fancontrol read attribute-list 1 1 - - Via the TH (chip-tool), verify that theAttributeListattribute contains - - Mandatory entries:0x0000, 0x0001, 0x0002, 0x0003, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Based on feature support:- 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b - Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1686031154.064099][14930:14933] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_FFFB DataVersion: 3896103279 - [1686031154.064331][14930:14933] CHIP:TOO: AttributeList: 18 entries - [1686031154.064408][14930:14933] CHIP:TOO: [1]: 0 - [1686031154.064468][14930:14933] CHIP:TOO: [2]: 1 - [1686031154.064526][14930:14933] CHIP:TOO: [3]: 2 - [1686031154.064584][14930:14933] CHIP:TOO: [4]: 3 - [1686031154.064640][14930:14933] CHIP:TOO: [5]: 4 - [1686031154.064697][14930:14933] CHIP:TOO: [6]: 5 - [1686031154.064754][14930:14933] CHIP:TOO: [7]: 6 - [1686031154.064811][14930:14933] CHIP:TOO: [8]: 7 - [1686031154.064868][14930:14933] CHIP:TOO: [9]: 8 - [1686031154.064929][14930:14933] CHIP:TOO: [10]: 9 - [1686031154.064987][14930:14933] CHIP:TOO: [11]: 10 - [1686031154.065045][14930:14933] CHIP:TOO: [12]: 11 - [1686031154.065103][14930:14933] CHIP:TOO: [13]: 65528 - [1686031154.065161][14930:14933] CHIP:TOO: [14]: 65529 - [1686031154.065218][14930:14933] CHIP:TOO: [15]: 65530 - [1686031154.065275][14930:14933] CHIP:TOO: [16]: 65531 - [1686031154.065333][14930:14933] CHIP:TOO: [17]: 65532 - [1686031154.065390][14930:14933] CHIP:TOO: [18]: 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 4a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" PICS: " !FAN.S.C00.Rsp " command: "readAttribute" attribute: "AcceptedCommandList" @@ -248,39 +187,7 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4b: 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 fancontrol read accepted-command-list 1 1 - - On TH(chip-tool), Verify the AcceptedCommandList attribute that contains 1 entries: - Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1686031757.840606][14982:14984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_FFF9 DataVersion: 3896103279 - [1686031757.840879][14982:14984] CHIP:TOO: AcceptedCommandList: 1 entries - [1686031757.840958][14982:14984] CHIP:TOO: [1]: 0 - 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: 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" @@ -289,30 +196,10 @@ tests: type: list contains: [0] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 5b: TH reads from the DUT the GeneratedCommandList attribute. - 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 fancontrol read generated-command-list 1 1 - - On TH(chip-tool), Verify the GeneratedCommandList attribute that contains 0 entries: - - [1689587005.212317][9422:9424] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0202 Attribute 0x0000_FFF8 DataVersion: 3321937588 - [1689587005.212457][9422:9424] 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: 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 61132393faad94..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 @@ -47,7 +47,7 @@ tests: constraints: type: bitmap32 - - 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" @@ -56,7 +56,7 @@ tests: type: list contains: [0, 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" @@ -65,123 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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 b64b3feee7a915..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 @@ -313,56 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 formaldehydeconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that theAttributeList attribute contains - - Mandatory entries:0x0009,0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000,0x0001.0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x000a - - [1685960397.210408][11541:11543] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042B Attribute 0x0000_FFFB DataVersion: 41919546 - [1687332771.911694][4110:4112] CHIP:TOO: AttributeList: 17 entries - [1687332771.911766][4110:4112] CHIP:TOO: [1]: 0 - [1687332771.911827][4110:4112] CHIP:TOO: [2]: 1 - [1687332771.911884][4110:4112] CHIP:TOO: [3]: 2 - [1687332771.911940][4110:4112] CHIP:TOO: [4]: 3 - [1687332771.911997][4110:4112] CHIP:TOO: [5]: 4 - [1687332771.912053][4110:4112] CHIP:TOO: [6]: 5 - [1687332771.912109][4110:4112] CHIP:TOO: [7]: 6 - [1687332771.912165][4110:4112] CHIP:TOO: [8]: 7 - [1687332771.912223][4110:4112] CHIP:TOO: [9]: 8 - [1687332771.912279][4110:4112] CHIP:TOO: [10]: 9 - [1687332771.912337][4110:4112] CHIP:TOO: [11]: 10 - [1687332771.912395][4110:4112] CHIP:TOO: [12]: 65528 - [1687332771.912453][4110:4112] CHIP:TOO: [13]: 65529 - [1687332771.912511][4110:4112] CHIP:TOO: [14]: 65530 - [1687332771.912569][4110:4112] CHIP:TOO: [15]: 65531 - [1687332771.912626][4110:4112] CHIP:TOO: [16]: 65532 - [1687332771.912683][4110:4112] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -371,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 formaldehydeconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960313.959334][11536:11538] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042B Attribute 0x0000_FFFA DataVersion: 41919546 - [1685960313.959445][11536:11538] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -407,33 +327,6 @@ tests: constraints: type: list - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 formaldehydeconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960703.799496][11550:11552] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042B Attribute 0x0000_FFF9 DataVersion: 41919546 - [1685960703.799652][11550:11552] 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: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" @@ -441,30 +334,3 @@ tests: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 formaldehydeconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685960779.325075][11556:11558] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042B Attribute 0x0000_FFF8 DataVersion: 41919546 - [1685960779.325258][11556:11558] 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" 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 2ae4c280ed81c6..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 @@ -74,127 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 - 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 bbc25e6b518983..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,64 +86,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - 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: @@ -190,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..2dc8dbd544b233 --- /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: 0 epochKey1: d1d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime1: 2220001 epochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf + epochStartTime2: 2220002" + PICS: "!GRPKEY.S.F00 && GRPKEY.S.C00.Rsp " + verification: | + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 1, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 0, "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..f2f708f273f8d0 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 + [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: 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 316409e16ae96f..c4a35cad32dad2 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 @@ -26,22 +26,21 @@ 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: 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..7c0428940d7992 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 @@ -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 267e5c7e4dbd3f..7814f985956b25 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 @@ -143,50 +143,7 @@ tests: type: list contains: [5] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4f: TH reads from the DUT the AttributeList attribute. 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 hepafiltermonitoring read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0002,0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0003 - - Based on feature support:- 0x0000, 0x0001 - - [1690183725.059324][8158:8160] CHIP:TOO: AttributeList: 12 entries - [1690183725.059384][8158:8160] CHIP:TOO: [1]: 0 - [1690183725.059436][8158:8160] CHIP:TOO: [2]: 1 - [1690183725.059487][8158:8160] CHIP:TOO: [3]: 2 - [1690183725.059536][8158:8160] CHIP:TOO: [4]: 3 - [1690183725.059584][8158:8160] CHIP:TOO: [5]: 4 - [1690183725.059633][8158:8160] CHIP:TOO: [6]: 5 - [1690183725.059683][8158:8160] CHIP:TOO: [7]: 65528 - [1690183725.059732][8158:8160] CHIP:TOO: [8]: 65529 - [1690183725.059780][8158:8160] CHIP:TOO: [9]: 65530 - [1690183725.059829][8158:8160] CHIP:TOO: [10]: 65531 - [1690183725.059878][8158:8160] CHIP:TOO: [11]: 65532 - [1690183725.059927][8158:8160] CHIP:TOO: [12]: 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: TH reads EventList attribute from DUT" + - label: "Step 5: TH reads EventList attribute from DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -195,72 +152,17 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 hepafiltermonitoring read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685962407.372836][11665:11667] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0071 Attribute 0x0000_FFFA DataVersion: 1815992336 - [1685962407.372946][11665:11667] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - 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: [] - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - 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 hepafiltermonitoring read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685962490.529022][11669:11671] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0071 Attribute 0x0000_FFF9 DataVersion: 1815992336 - [1685962490.529297][11669:11671] CHIP:TOO: AcceptedCommandList: 0 entries - [1690183785.805331][8169:8171] CHIP:TOO: [1]: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - 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" @@ -270,37 +172,10 @@ tests: type: list contains: [0] - - label: "Step 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - # List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - 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 hepafiltermonitoring read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685962569.646786][11676:11678] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0071 Attribute 0x0000_FFF8 DataVersion: 1815992336 - [1685962569.646938][11676:11678] 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" 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 index 20924a25cae7b0..5e8af70f3a8fc0 100755 --- a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml @@ -106,54 +106,7 @@ tests: type: list contains: [5] - #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: | - ./chip-tool icdmanagement read attribute-list 1 0 - - Verify " AttributeList "should include the mandatory attributes (values 0, 1, 2) and - global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) - The list include entries based on feature support: - 0x0003: SHALL be included if and only if ICDM.S.A0003(RegisteredClients) - 0x0004: SHALL be included if and only if ICDM.S.A0004(IcdCounter) - 0x0005: SHALL be included if and only if ICDM.S.A0005(ClientsSupportedPerFabric) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - - [1685123797636] [39641:392416] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFFB DataVersion: 93993128 - [1685123797636] [39641:392416] [TOO] AttributeList: 12 entries - [1685123797636] [39641:392416] [TOO] [1]: 0 - [1685123797636] [39641:392416] [TOO] [2]: 1 - [1685123797636] [39641:392416] [TOO] [3]: 2 - [1685123797636] [39641:392416] [TOO] [4]: 3 - [1685123797636] [39641:392416] [TOO] [5]: 4 - [1685123797637] [39641:392416] [TOO] [6]: 5 - [1685123797637] [39641:392416] [TOO] [7]: 65528 - [1685123797637] [39641:392416] [TOO] [8]: 65529 - [1685123797637] [39641:392416] [TOO] [9]: 65530 - [1685123797637] [39641:392416] [TOO] [10]: 65531 - [1685123797638] [39641:392416] [TOO] [11]: 65532 - [1685123797638] [39641:392416] [TOO] [12]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -162,36 +115,6 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 icdmanagement read event-list 1 0 - - 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. - - - [1685123881696] [39723:393591] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFFA DataVersion: 93993128 - [1685123881696] [39723:393591] [TOO] EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 6a: TH reads AcceptedCommandList attribute from DUT" PICS: " !ICDM.S.F00 && !ICDM.S.C03.Rsp " command: "readAttribute" @@ -223,40 +146,7 @@ tests: type: list contains: [3] - - label: - "Step 6d: 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 icdmanagement read accepted-command-list 1 0 - - Verify the "AcceptedCommandList" contains feature dependent commands - if ICDM.S.F00(CIP) feature supports list includes(value 0x0000 and 0x02) and - The list MAY include these optional entries: - if ICDM.S.C01.Rsp(StayActiveRequest) feature supports list includes(value 0x0003) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - - [1685123917843] [39747:394032] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFF9 DataVersion: 93993128 - [1685123917843] [39747:394032] [TOO] AcceptedCommandList: 3 entries - [1685123917843] [39747:394032] [TOO] [1]: 0 - [1685123917844] [39747:394032] [TOO] [2]: 2 - [1685123917844] [39747:394032] [TOO] [3]: 3 - 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 attribute from DUT" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" PICS: " !ICDM.S.F00 " command: "readAttribute" attribute: "GeneratedCommandList" @@ -265,7 +155,7 @@ tests: constraints: type: list - - label: "Step 7a: TH reads GeneratedCommandList attribute from DUT" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" PICS: ICDM.S.F00 command: "readAttribute" attribute: "GeneratedCommandList" @@ -273,32 +163,3 @@ tests: constraints: type: list contains: [1] - - - 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 icdmanagement read generated-command-list 1 0 - - Verify "GeneratedCommandList" contains feature dependent commands - if ICDM.S.F00(CIP) feature supports list includes(value 0x0001), otherwise value is 0 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - - [1685123946015] [39758:394357] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_FFF8 DataVersion: 93993128 - [1685123946015] [39758:394357] [TOO] GeneratedCommandList: 1 entries - [1685123946015] [39758:394357] [TOO] [1]: 1 - 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_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_IDM_4_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_4_2.yaml index 67ceafbb3547b2..2a32e97e4872e0 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,46 +38,44 @@ 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: " 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. @@ -115,11 +113,11 @@ tests: 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) @@ -127,9 +125,9 @@ tests: basicinformation subscribe location 10 400 1 0 --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 (target hardware). + Check if a report data message is received on the CR1 (target hardware). 2. Verify Report Data Contents: Confirm that the received report data message contains the data of the attribute/event that was previously requested. @@ -166,13 +164,13 @@ tests: 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 +238,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 +259,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 +328,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 @@ -354,12 +352,12 @@ tests: 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 +421,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 +443,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 +453,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 +496,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 +593,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 +613,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 +655,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 +744,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_7_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_7_1.yaml index 4933e39e14f70b..a65bf0daf41c1f 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 @@ -342,178 +342,214 @@ 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: - "Step 3: RD2, RD3, RD4, RD5 send 3 Subscribe request messages each + "Step 3b: 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." 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 - [1684322787.342219][136396:136398] CHIP:TOO: LocalConfigDisabled: TRUE + [1684322787.342219][136396:136398] CHIP:TOO: LocalConfigDisabled: FALSE [1684322787.342246][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322787.342255][136396:136398] CHIP:TOO: Location: in + [1684322787.342255][136396:136398] CHIP:TOO: Location: XX [1684322787.342282][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322787.342289][136396:136398] CHIP:TOO: NodeLabel: "newnode" + [1684322787.342289][136396:136398] CHIP:TOO: NodeLabel: [1684322787.342308][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0001a460]: Moving to [AwaitingSu] [1684322787.342351][136396:136398] CHIP:EM: <<< [E:35584i S:50848 M:252532050 (Ack:201846722)] (S) Msg TX to 2:0000000000000002 [8559] --- Type 0001:01 (IM:StatusResponse) [1684322787.342363][136396:136398] CHIP:IN: (S) Sending msg 252532050 on secure session with LSID: 50848 @@ -536,11 +572,11 @@ tests: #2. 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 [1684322803.467486][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322803.467490][136409:136411] CHIP:TOO: LocalConfigDisabled: TRUE + [1684322803.467490][136409:136411] CHIP:TOO: LocalConfigDisabled: FALSE [1684322803.467499][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322803.467502][136409:136411] CHIP:TOO: Location: in + [1684322803.467502][136409:136411] CHIP:TOO: Location: XX [1684322803.467511][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322803.467513][136409:136411] CHIP:TOO: NodeLabel: "newnode" + [1684322803.467513][136409:136411] CHIP:TOO: NodeLabel: [1684322803.467520][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc01bb90]: Moving to [AwaitingSu] [1684322803.467531][136409:136411] CHIP:EM: <<< [E:42346i S:52489 M:199100316 (Ack:174085431)] (S) Msg TX to 3:0000000000000003 [5371] --- Type 0001:01 (IM:StatusResponse) [1684322803.467535][136409:136411] CHIP:IN: (S) Sending msg 199100316 on secure session with LSID: 52489 @@ -562,11 +598,11 @@ tests: #3. 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 [1684322837.225922][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322837.225930][136403:136405] CHIP:TOO: LocalConfigDisabled: TRUE + [1684322837.225930][136403:136405] CHIP:TOO: LocalConfigDisabled: FALSE [1684322837.225940][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322837.225943][136403:136405] CHIP:TOO: Location: in + [1684322837.225943][136403:136405] CHIP:TOO: Location: XX [1684322837.225952][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322837.225955][136403:136405] CHIP:TOO: NodeLabel: "newnode" + [1684322837.225955][136403:136405] CHIP:TOO: NodeLabel: [1684322837.225961][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc019c70]: Moving to [AwaitingSu] [1684322837.225980][136403:136405] CHIP:EM: <<< [E:28544i S:21311 M:202084358 (Ack:249111943)] (S) Msg TX to 4:0000000000000004 [8451] --- Type 0001:01 (IM:StatusResponse) [1684322837.225984][136403:136405] CHIP:IN: (S) Sending msg 202084358 on secure session with LSID: 21311 @@ -588,11 +624,11 @@ tests: #4. 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 [1684322852.957519][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684322852.957525][136414:136416] CHIP:TOO: LocalConfigDisabled: TRUE + [1684322852.957525][136414:136416] CHIP:TOO: LocalConfigDisabled: FALSE [1684322852.957537][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684322852.957541][136414:136416] CHIP:TOO: Location: in + [1684322852.957541][136414:136416] CHIP:TOO: Location: XX [1684322852.957552][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684322852.957556][136414:136416] CHIP:TOO: NodeLabel: "newnode" + [1684322852.957556][136414:136416] CHIP:TOO: NodeLabel: [1684322852.957564][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a400e880]: Moving to [AwaitingSu] [1684322852.957585][136414:136416] CHIP:EM: <<< [E:5171i S:40695 M:166661007 (Ack:81061555)] (S) Msg TX to 5:0000000000000005 [D311] --- Type 0001:01 (IM:StatusResponse) [1684322852.957590][136414:136416] CHIP:IN: (S) Sending msg 166661007 on secure session with LSID: 40695 @@ -645,20 +681,34 @@ 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 - [1684323009.937257][136393:136395] CHIP:TOO: LocalConfigDisabled: TRUE + [1684323009.937257][136393:136395] CHIP:TOO: LocalConfigDisabled: FALSE [1684323009.937274][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323009.937279][136393:136395] CHIP:TOO: Location: in + [1684323009.937279][136393:136395] CHIP:TOO: Location: XX [1684323009.937293][136393:136395] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323009.937298][136393:136395] CHIP:TOO: NodeLabel: "newnode" + [1684323009.937298][136393:136395] CHIP:TOO: NodeLabel: [1684323009.937308][136393:136395] CHIP:DMG: MoveToState ReadClient[0x7fb510002110]: Moving to [AwaitingSu] [1684323009.937334][136393:136395] CHIP:EM: <<< [E:41663i S:42488 M:180349725 (Ack:108042016)] (S) Msg TX to 1:0000000000000001 [E777] --- Type 0001:01 (IM:StatusResponse) [1684323009.937339][136393:136395] CHIP:IN: (S) Sending msg 180349725 on secure session with LSID: 42488 @@ -679,11 +729,11 @@ tests: #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 [1684323023.679481][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323023.679488][136396:136398] CHIP:TOO: LocalConfigDisabled: TRUE + [1684323023.679488][136396:136398] CHIP:TOO: LocalConfigDisabled: FALSE [1684323023.679503][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323023.679508][136396:136398] CHIP:TOO: Location: in + [1684323023.679508][136396:136398] CHIP:TOO: Location: xx [1684323023.679521][136396:136398] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323023.679525][136396:136398] CHIP:TOO: NodeLabel: "newnode" + [1684323023.679525][136396:136398] CHIP:TOO: NodeLabel: [1684323023.679535][136396:136398] CHIP:DMG: MoveToState ReadClient[0x7f6a0000a890]: Moving to [AwaitingSu] [1684323023.679556][136396:136398] CHIP:EM: <<< [E:35585i S:50848 M:252532054 (Ack:201846726)] (S) Msg TX to 2:0000000000000002 [8559] --- Type 0001:01 (IM:StatusResponse) [1684323023.679563][136396:136398] CHIP:IN: (S) Sending msg 252532054 on secure session with LSID: 50848 @@ -705,11 +755,11 @@ tests: #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 [1684323039.115907][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323039.115916][136409:136411] CHIP:TOO: LocalConfigDisabled: TRUE + [1684323039.115916][136409:136411] CHIP:TOO: LocalConfigDisabled: FALSE [1684323039.115943][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323039.115949][136409:136411] CHIP:TOO: Location: in + [1684323039.115949][136409:136411] CHIP:TOO: Location: XX [1684323039.115977][136409:136411] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323039.115981][136409:136411] CHIP:TOO: NodeLabel: "newnode" + [1684323039.115981][136409:136411] CHIP:TOO: NodeLabel: [1684323039.116000][136409:136411] CHIP:DMG: MoveToState ReadClient[0x7f53dc016c20]: Moving to [AwaitingSu] [1684323039.116030][136409:136411] CHIP:EM: <<< [E:42347i S:52489 M:199100320 (Ack:174085435)] (S) Msg TX to 3:0000000000000003 [5371] --- Type 0001:01 (IM:StatusResponse) [1684323039.116039][136409:136411] CHIP:IN: (S) Sending msg 199100320 on secure session with LSID: 52489 @@ -731,11 +781,11 @@ tests: #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 [1684323055.304162][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323055.304177][136403:136405] CHIP:TOO: LocalConfigDisabled: TRUE + [1684323055.304177][136403:136405] CHIP:TOO: LocalConfigDisabled: FALSE [1684323055.304206][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323055.304216][136403:136405] CHIP:TOO: Location: in + [1684323055.304216][136403:136405] CHIP:TOO: Location: XX [1684323055.304243][136403:136405] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323055.304250][136403:136405] CHIP:TOO: NodeLabel: "newnode" + [1684323055.304250][136403:136405] CHIP:TOO: NodeLabel: [1684323055.304274][136403:136405] CHIP:DMG: MoveToState ReadClient[0x7ff4cc010a60]: Moving to [AwaitingSu] [1684323055.304312][136403:136405] CHIP:EM: <<< [E:28545i S:21311 M:202084362 (Ack:249111947)] (S) Msg TX to 4:0000000000000004 [8451] --- Type 0001:01 (IM:StatusResponse) [1684323055.304324][136403:136405] CHIP:IN: (S) Sending msg 202084362 on secure session with LSID: 21311 @@ -756,11 +806,11 @@ tests: any subscribe-by-id '0x0028,0x0028,0x0028' '5,6,16' 100 1000 5 '0,0,0' --commissioner-name 5 --keepSubscriptions true [1684323072.765216][136414:136416] CHIP:DMG: } [1684323072.765277][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0010 DataVersion: 3947588725 - [1684323072.765290][136414:136416] CHIP:TOO: LocalConfigDisabled: TRUE + [1684323072.765290][136414:136416] CHIP:TOO: LocalConfigDisabled: FALSE [1684323072.765318][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0006 DataVersion: 3947588725 - [1684323072.765327][136414:136416] CHIP:TOO: Location: in + [1684323072.765327][136414:136416] CHIP:TOO: Location: XX [1684323072.765352][136414:136416] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3947588725 - [1684323072.765359][136414:136416] CHIP:TOO: NodeLabel: "newnode" + [1684323072.765359][136414:136416] CHIP:TOO: NodeLabel: [1684323072.765379][136414:136416] CHIP:DMG: MoveToState ReadClient[0x7f58a4014ee0]: Moving to [AwaitingSu] [1684323072.765426][136414:136416] CHIP:EM: <<< [E:5172i S:40695 M:166661011 (Ack:81061559)] (S) Msg TX to 5:0000000000000005 [D311] --- Type 0001:01 (IM:StatusResponse) [1684323072.765439][136414:136416] CHIP:IN: (S) Sending msg 166661011 on secure session with LSID: 40695 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 8ea873b567d34b..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,29 +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 && PICS_EVENT_LIST_ENABLED - 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 fb5fb954f62b3b..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 @@ -125,23 +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 && PICS_EVENT_LIST_ENABLED - 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..77cd19748e8e0b 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 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" 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_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_LWM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_1.yaml index e06d2b9761edd9..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,95 +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 - - 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 + 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] - 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_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index 1463f1ef97e668..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,55 +107,7 @@ tests: type: list contains: [5] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4d: 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 nitrogendioxideconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1687330774.078611][3846:3848] CHIP:TOO: AttributeList: 17 entries - [1687330774.078688][3846:3848] CHIP:TOO: [1]: 0 - [1687330774.078999][3846:3848] CHIP:TOO: [2]: 1 - [1687330774.079101][3846:3848] CHIP:TOO: [3]: 2 - [1687330774.079334][3846:3848] CHIP:TOO: [4]: 3 - [1687330774.079400][3846:3848] CHIP:TOO: [5]: 4 - [1687330774.079457][3846:3848] CHIP:TOO: [6]: 5 - [1687330774.079761][3846:3848] CHIP:TOO: [7]: 6 - [1687330774.079862][3846:3848] CHIP:TOO: [8]: 7 - [1687330774.079959][3846:3848] CHIP:TOO: [9]: 8 - [1687330774.080020][3846:3848] CHIP:TOO: [10]: 9 - [1687330774.080078][3846:3848] CHIP:TOO: [11]: 10 - [1687330774.080137][3846:3848] CHIP:TOO: [12]: 65528 - [1687330774.080441][3846:3848] CHIP:TOO: [13]: 65529 - [1687330774.080532][3846:3848] CHIP:TOO: [14]: 65530 - [1687330774.080610][3846:3848] CHIP:TOO: [15]: 65531 - [1687330774.080704][3846:3848] CHIP:TOO: [16]: 65532 - [1687330774.080764][3846:3848] CHIP:TOO: [17]: 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: TH reads from the DUT the EventList attribute" + - label: "Step 5: TH reads from the DUT the EventList attribute" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -164,36 +116,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 modeselect 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: - - [1689917350.563148][4845:4847] CHIP:DMG: } - [1689917350.570130][4845:4847] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_FFFA DataVersion: 2316721935 - [1689917350.572844][4845:4847] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: TH reads AcceptedCommandList attribute from DUT" + - label: "Step 6: TH reads AcceptedCommandList attribute from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -201,63 +124,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 nitrogendioxideconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0413 Attribute 0x0000_FFF9 DataVersion: 2476226943 - [1685966056.111377][11860:11862] 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 7a: TH reads GeneratedCommandList attribute from DUT" + - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 nitrogendioxideconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0413 Attribute 0x0000_FFF8 DataVersion: 2476226943 - [1685966085.385829][11867:11869] 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" 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 94419844933a8e..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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 nitrogendioxideconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1687330774.078611][3846:3848] CHIP:TOO: AttributeList: 17 entries - [1687330774.078688][3846:3848] CHIP:TOO: [1]: 0 - [1687330774.078999][3846:3848] CHIP:TOO: [2]: 1 - [1687330774.079101][3846:3848] CHIP:TOO: [3]: 2 - [1687330774.079334][3846:3848] CHIP:TOO: [4]: 3 - [1687330774.079400][3846:3848] CHIP:TOO: [5]: 4 - [1687330774.079457][3846:3848] CHIP:TOO: [6]: 5 - [1687330774.079761][3846:3848] CHIP:TOO: [7]: 6 - [1687330774.079862][3846:3848] CHIP:TOO: [8]: 7 - [1687330774.079959][3846:3848] CHIP:TOO: [9]: 8 - [1687330774.080020][3846:3848] CHIP:TOO: [10]: 9 - [1687330774.080078][3846:3848] CHIP:TOO: [11]: 10 - [1687330774.080137][3846:3848] CHIP:TOO: [12]: 65528 - [1687330774.080441][3846:3848] CHIP:TOO: [13]: 65529 - [1687330774.080532][3846:3848] CHIP:TOO: [14]: 65530 - [1687330774.080610][3846:3848] CHIP:TOO: [15]: 65531 - [1687330774.080704][3846:3848] CHIP:TOO: [16]: 65532 - [1687330774.080764][3846:3848] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 nitrogendioxideconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0413 Attribute 0x0000_FFFA DataVersion: 2476226943 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,63 +327,10 @@ tests: constraints: type: list - - 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 nitrogendioxideconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0413 Attribute 0x0000_FFF9 DataVersion: 2476226943 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 nitrogendioxideconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0413 Attribute 0x0000_FFF8 DataVersion: 2476226943 - [1685966085.385829][11867:11869] 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" 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 e766d8164ac965..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,79 +98,14 @@ tests: type: list contains: [16384, 16385, 16386, 16387] - #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 onoff read attribute-list 1 1 - - Verify "AttributeList" contains a list of mandatory attributes (value 0), - - Global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528), - - Feature dependent attribute If OO.S.F00(LT) feature supports (Values 0x4000, 0x4001, 0x4002 and 0x4003) on the TH(Chip-tool) Log and Below is the sample log provided for the raspi platform: - - [1676289026.377401][4351:4353] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_FFFB DataVersion: 659547221 - [1676289026.377502][4351:4353] CHIP:TOO: AttributeList: 11 entries - [1676289026.377529][4351:4353] CHIP:TOO: [1]: 0 - [1676289026.377552][4351:4353] CHIP:TOO: [2]: 16384 - [1676289026.377575][4351:4353] CHIP:TOO: [3]: 16385 - [1676289026.377599][4351:4353] CHIP:TOO: [4]: 16386 - [1676289026.377622][4351:4353] CHIP:TOO: [5]: 16387 - [1676289026.377648][4351:4353] CHIP:TOO: [6]: 65528 - [1676289026.377673][4351:4353] CHIP:TOO: [7]: 65529 - [1676289026.377701][4351:4353] CHIP:TOO: [8]: 65530 - [1676289026.377720][4351:4353] CHIP:TOO: [9]: 65531 - [1676289026.377750][4351:4353] CHIP:TOO: [10]: 65532 - [1676289026.377772][4351:4353] CHIP:TOO: [11]: 65533 - [1676289026.377989][4351:4353] CHIP:EM: <<< [E:19140i M:46071945 (Ack:30183253)] (S) Msg TX to 1:0000000000 - 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 from the DUT the EventList attribute. 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 onoff 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: - - [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 && PICS_EVENT_LIST_ENABLED - 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" @@ -191,70 +126,10 @@ tests: type: list contains: [64, 65, 66] - - 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 onoff read accepted-command-list 1 1 - - Verify "AcceptedCommandList" contains a list of mandatory commands (value 0, 1 and 2) - - If feature supports OO.S.F00(LT) list contains (values 0x40, 0x41 and 0x42) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1646045691.415739][36078:36083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_FFF9DataVersion: 1805855192 - [1646045691.415819][36078:36083] CHIP:TOO: AcceptedCommandList: 6 entries - [1646045691.415876][36078:36083] CHIP:TOO: [1]: 0 - [1646045691.415901][36078:36083] CHIP:TOO: [2]: 1 - [1646045691.415925][36078:36083] CHIP:TOO: [3]: 2 - [1646045691.415950][36078:36083] CHIP:TOO: [4]: 64 - [1646045691.415973][36078:36083] CHIP:TOO: [5]: 65 - [1646045691.415997][36078:36083] CHIP:TOO: [6]: 66 - 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: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 onoff read generated-command-list 1 1 - - Verify "GeneratedCommandList" contains a list of supported commands, 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: - - [1650436601.944126][6139:6144] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_FFF8 DataVersion: 3082972176 - [1650436601.944272][6139:6144] 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" 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 4317aaa975c8dc..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 @@ -50,7 +50,7 @@ tests: constraints: type: bitmap32 - - 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" @@ -73,7 +73,7 @@ tests: 0x05, ] - - 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" @@ -95,81 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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 && PICS_EVENT_LIST_ENABLED - 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" + - label: "Step 6: TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -177,79 +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 - 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: [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 - 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_7.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml new file mode 100644 index 00000000000000..d8e3bb279c7402 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_7.yaml @@ -0,0 +1,210 @@ +# 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: 15.2.6. [TC-OPCREDS-3.7] Add Second Fabric over CASE [DUT-Server] + +PICS: + - OPCREDS.S + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Pre-Conditions" + verification: | + TH1 and TH2 are 2 clients that trust each other + disabled: true + + - label: + "Step 1: Factory Reset DUT (to ensure NOC list is empty at the + beginning of the following steps)" + PICS: OPCREDS.S.A0000 + verification: | + On both DUT and TH side, on Raspi we do factory reset with the below command. The DUT for cert should follow vendor specific procedure for factory reset + sudo rm -rf /tmp/chip_* + disabled: true + + - label: + "Step 2: Start the commissioning process of DUT by TH1 on the first + Fabric." + verification: | + On TH (chip-tool) side: + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + [1690193191.894851][13219:13221] CHIP:CTL: Received CommissioningComplete response, errorCode=0 + [1690193191.894879][13219:13221] CHIP:CTL: Successfully finished commissioning step 'SendComplete' + + + On DUT(all-clusters-app) side: + ./all-clusters-app + [1641381202.306840][4431:4431] CHIP:DL: NVS set: chip-config/regulatory-location = 0 (0x0) + disabled: true + + - label: + "Step 3: TH1 does a non-fabric-filtered read of the Fabrics attribute + from the Node Operational Credentials cluster. Save the FabricIndex + for TH1 as TH1_Fabric_Index for future use." + PICS: OPCREDS.S.A0001 + verification: | + ./chip-tool operationalcredentials read fabrics 1 0 + + Verify on the Th(chip-tool) that fabrics has only 1 entry and save the fabric index as TH1_Fabric_Index for using in the following steps + + + [1690193331.552693][13227:13229] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 632277469 + [1690193331.552824][13227:13229] CHIP:TOO: Fabrics: 1 entries + [1690193331.552910][13227:13229] CHIP:TOO: [1]: { + [1690193331.552945][13227:13229] CHIP:TOO: RootPublicKey: 04AD3DD61741C7F8BB56C922BCAADF1A44BD7AB7A00BB3D3D9CDB6C5889C841AA59C62C5A504CA2DE33BFE0626B6E570DC1716ECA769295C0D6BBB0FA5B3A5E69C + [1690193331.552972][13227:13229] CHIP:TOO: VendorID: 65521 + [1690193331.552997][13227:13229] CHIP:TOO: FabricID: 1 + [1690193331.553020][13227:13229] CHIP:TOO: NodeID: 1 + [1690193331.553044][13227:13229] CHIP:TOO: Label: + [1690193331.553066][13227:13229] CHIP:TOO: FabricIndex: 1 + [1690193331.553088][13227:13229] CHIP:TOO: } + [1690193331.553268][13227:13229] CHIP:EM: <<< [E:60956i S:18401 M:33374407 (Ack:23211476)] (S) Msg TX to 1:0000000000000001 [C23D] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - 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 + verification: | + ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 + + Verify on the Th(chip-tool) that DUT sends ArmFailSafeResponse command to TH1 with field ErrorCode as OK(0) + + [1690226811353] [19885:5418547] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 + [1690226811354] [19885:5418547] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 + [1690226811354] [19885:5418547] [TOO] ArmFailSafeResponse: { + [1690226811354] [19885:5418547] [TOO] errorCode: 0 + [1690226811354] [19885:5418547] [TOO] debugText: + [1690226811354] [19885:5418547] [TOO] } + disabled: true + + - label: "Step 5: TH1 Sends CSRRequest command with a random 32-byte nonce" + PICS: OPCREDS.S.C04.Rsp + verification: | + To get CSR Nonce give below command + echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) + + ./chip-tool operationalcredentials csrrequest 1 0 + + ./chip-tool operationalcredentials csrrequest hex:A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F359902982717603 1 0 + + Verify the CSRResponse in TH Log + + [1658223679.580697][6136:6141] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 + [1658223679.580761][6136:6141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 + [1658223679.580823][6136:6141] CHIP:TOO: CSRResponse: { + [1658223679.580875][6136:6141] CHIP:TOO: NOCSRElements: 153001CB3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200047DA16C714034D3B96716F64DC0E742D007233212025E305AF6CE56DFA057718E149E52B39584456C8F954A1596B64F8BBC02E501276B962D4AB2C0A607D983C9A000300A06082A8648CE3D040302034800304502206FB78A61A7B0F021C396FEC1CCD6802129AC3EE5EA2727ABCCB19DBAEA7DEE1A022100A5C81ADC5D8BFAA5DB84A1261D8BBCEA5C26B24D4405F0B978E19B17D8458C9E300220A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F35990298271760318 + [1658223679.580915][6136:6141] CHIP:TOO: attestationSignature: EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE + [1658223679.580943][6136:6141] CHIP:TOO: } + disabled: true + + - label: + "Step 6: TH1 validates the Device Attestation Signature + (attestation_signature) field from CSRResponse command in Step 5" + PICS: OPCREDS.S.C04.Rsp + verification: | + To get CSR Nonce give below command + echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) + + ./chip-tool operationalcredentials csrrequest 1 0 + + ./chip-tool operationalcredentials csrrequest hex:A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F359902982717603 1 0 + + Verify the CSRResponse in TH Log + + [1658223679.580697][6136:6141] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 + [1658223679.580761][6136:6141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 + [1658223679.580823][6136:6141] CHIP:TOO: CSRResponse: { + [1658223679.580875][6136:6141] CHIP:TOO: NOCSRElements: 153001CB3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200047DA16C714034D3B96716F64DC0E742D007233212025E305AF6CE56DFA057718E149E52B39584456C8F954A1596B64F8BBC02E501276B962D4AB2C0A607D983C9A000300A06082A8648CE3D040302034800304502206FB78A61A7B0F021C396FEC1CCD6802129AC3EE5EA2727ABCCB19DBAEA7DEE1A022100A5C81ADC5D8BFAA5DB84A1261D8BBCEA5C26B24D4405F0B978E19B17D8458C9E300220A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F35990298271760318 + [1658223679.580915][6136:6141] CHIP:TOO: attestationSignature: EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE + [1658223679.580943][6136:6141] CHIP:TOO: } + disabled: true + + - label: + "Step 7: 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. + The certificates shall have their subjects padded with additional data + such that they are each the maximum certificate size of 400 bytes when + encoded in the MatterCertificateEncoding. Save RCAC as + Root_CA_Certificate_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" + verification: | + + disabled: true + + - label: + "Step 8: TH1 sends AddTrustedRootCertificate command to DUT with + RootCACertificate set to Root_CA_Certificate_TH2" + PICS: OPCREDS.S.C0b.Rsp + verification: | + Verify that AddTrustedRootCertificate command succeeds by sending the status code as SUCCESS + disabled: true + + - label: + "Step 9: 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 + verification: | + Verify that DUT responds with NOCResponse with status code OK + disabled: true + + - label: "Step 10: TH2 starts discovery of DUT using Operational Discovery" + verification: | + + disabled: true + + - label: + "Step 11: TH2 opens a CASE session with DUT over operational network" + verification: | + DUT is able to open the CASE session with TH2 + disabled: true + + - label: "Step 12: TH2 sends CommissioningComplete command" + PICS: CGEN.S.C05.Tx + verification: | + DUT respond with SUCCESS at CommissioningComplete command sent by TH2 + disabled: true + + - label: + "Step 13: TH1 does a non-fabric-filtered read of the Fabrics attribute + from the Node Operational Credentials cluster. Save the FabricIndex + for TH2s entry as TH2_Fabric_Index for future use." + PICS: OPCREDS.S.A0001 + verification: | + Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index. + disabled: true + + - label: + "Step 14: TH2 does a non-fabric-filtered read of the Fabrics attribute + from the Node Operational Credentials cluster" + PICS: OPCREDS.S.A0001 + verification: | + Verify that there are 2 entries in the list where one entry matches TH1_Fabric_Index and the other matches TH2_Fabric_Index. + disabled: true + + - label: + "Step 15: TH1 sends RemoveFabric command to DUT with the FabricIndex + field set to TH2_Fabric_Index." + PICS: OPCREDS.S.C0a.Rsp + verification: | + Verify that DUT sends NOCResponse command with status code OK + disabled: true 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 6249d6090fe34c..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 @@ -77,50 +77,6 @@ tests: type: list contains: [2] - #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 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 operationalstate read attribute-list 1 1 - - Verify " AttributeList " value consists the list of mandatory attributes (0, 1, 3, 4, 5, 65533, 65532, 65531, 65529, 65528) and it may include the optional attribute (2) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - - [1689672825.768926][16510:16512] CHIP:DMG: } - [1689672825.769078][16510:16512] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_FFFB DataVersion: 2102885775 - [1689672825.769134][16510:16512] CHIP:TOO: AttributeList: 12 entries - [1689672825.769153][16510:16512] CHIP:TOO: [1]: 0 - [1689672825.769160][16510:16512] CHIP:TOO: [2]: 1 - [1689672825.769166][16510:16512] CHIP:TOO: [3]: 2 - [1689672825.769172][16510:16512] CHIP:TOO: [4]: 3 - [1689672825.769179][16510:16512] CHIP:TOO: [5]: 4 - [1689672825.769185][16510:16512] CHIP:TOO: [6]: 5 - [1689672825.769192][16510:16512] CHIP:TOO: [7]: 65528 - [1689672825.769198][16510:16512] CHIP:TOO: [8]: 65529 - [1689672825.769204][16510:16512] CHIP:TOO: [9]: 65530 - [1689672825.769211][16510:16512] CHIP:TOO: [10]: 65531 - [1689672825.769217][16510:16512] CHIP:TOO: [11]: 65532 - [1689672825.769223][16510:16512] CHIP:TOO: [12]: 65533 - [1689672825.769288][16510:16512] CHIP:EM: <<< [E:46431i S:41930 M:194976396 (Ack:61934436)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689672825.769302][16510:16512] CHIP:IN: (S) Sending msg 194976396 on secure session with LSID: 41930 - [1689672825.769356][16510:16512] CHIP:EM: Flushed pending ack for MessageCounter:61934436 on exchange 46431i - 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: TH reads from the DUT the EventList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" @@ -141,45 +97,8 @@ tests: type: list contains: [0x01] - - label: - "Step 5c: TH reads from the DUT the EventList attribute. 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 operationalstate read event-list 1 1 - - Verify " EventList attribute " value consists the list of mandatory event (0) and it may include the optional events (1) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - - - [1689672855.519671][16517:16519] CHIP:DMG: } - [1689672855.519771][16517:16519] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_FFFA DataVersion: 2102885775 - [1689672855.519802][16517:16519] CHIP:TOO: EventList: 2 entries - [1689672855.519820][16517:16519] CHIP:TOO: [1]: 0 - [1689672855.519826][16517:16519] CHIP:TOO: [2]: 1 - [1689672855.519881][16517:16519] CHIP:EM: <<< [E:4310i S:43612 M:6147213 (Ack:7921904)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689672855.519894][16517:16519] CHIP:IN: (S) Sending msg 6147213 on secure session with LSID: 43612 - [1689672855.519920][16517:16519] CHIP:EM: Flushed pending ack for MessageCounter:7921904 on exchange 4310i - [1689672855.520077][16517:16517] CHIP:CTL: Shutting down the commissioner - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Step 6a: Read the optional command(Start) in AcceptedCommandList" - PICS: OPSTATE.S.C02 + PICS: OPSTATE.S.C02.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -188,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: @@ -197,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: @@ -206,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: @@ -214,43 +133,10 @@ tests: type: list contains: [0, 3] - - label: - "Step 6e: 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 operationalstate read accepted-command-list 1 1 - - Verify " AcceptedCommandList " consists the list may include the optional commands(0, 1, 2,and 3) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - [1689672881.193903][16526:16528] CHIP:DMG: } - [1689672881.194022][16526:16528] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_FFF9 DataVersion: 2102885775 - [1689672881.194058][16526:16528] CHIP:TOO: AcceptedCommandList: 4 entries - [1689672881.194093][16526:16528] CHIP:TOO: [1]: 0 - [1689672881.194103][16526:16528] CHIP:TOO: [2]: 1 - [1689672881.194109][16526:16528] CHIP:TOO: [3]: 2 - [1689672881.194115][16526:16528] CHIP:TOO: [4]: 3 - [1689672881.194175][16526:16528] CHIP:EM: <<< [E:46466i S:132 M:218213214 (Ack:205218134)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689672881.194189][16526:16528] CHIP:IN: (S) Sending msg 218213214 on secure session with LSID: 132 - [1689672881.194219][16526:16528] CHIP:EM: Flushed pending ack for MessageCounter:205218134 on exchange 46466i - 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: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" PICS: - "!OPSTATE.S.C00 || !OPSTATE.S.C01 || !OPSTATE.S.C02 || !OPSTATE.S.C03" + "!OPSTATE.S.C00.Rsp && !OPSTATE.S.C01.Rsp && !OPSTATE.S.C02.Rsp && + !OPSTATE.S.C03.Rsp" command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -258,43 +144,13 @@ tests: constraints: type: list - - label: "Step 7a: Read the global attribute: GeneratedCommandList" - PICS: (OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03) + - 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: constraints: type: list contains: [4] - - - 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 operationalstate read generated-command-list 1 1 - - Verify "GeneratedCommandList" consists the list may include the optional commands(4) on the TH(Chip-tool) Log: - Below is the sample log provided for the raspi platform: - [1689672911.044845][16535:16537] CHIP:DMG: } - [1689672911.044936][16535:16537] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0060 Attribute 0x0000_FFF8 DataVersion: 2102885775 - [1689672911.044966][16535:16537] CHIP:TOO: GeneratedCommandList: 1 entries - [1689672911.044986][16535:16537] CHIP:TOO: [1]: 4 - [1689672911.045041][16535:16537] CHIP:EM: <<< [E:10854i S:1089 M:96850287 (Ack:64309924)] (S) Msg TX to 1:0000000000000001 [BFDE] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1689672911.045054][16535:16537] CHIP:IN: (S) Sending msg 96850287 on secure session with LSID: 1089 - [1689672911.045079][16535:16537] CHIP:EM: Flushed pending ack for MessageCounter:64309924 on exchange 10854i - [1689672911.045189][16535:16535] CHIP:CTL: Shutting down the commissioner - 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_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 659fc245be8625..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 @@ -313,53 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 ozoneconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1687331790.438405][3951:3953] CHIP:TOO: AttributeList: 17 entries - [1687331790.438477][3951:3953] CHIP:TOO: [1]: 0 - [1687331790.438538][3951:3953] CHIP:TOO: [2]: 1 - [1687331790.438595][3951:3953] CHIP:TOO: [3]: 2 - [1687331790.438652][3951:3953] CHIP:TOO: [4]: 3 - [1687331790.438736][3951:3953] CHIP:TOO: [5]: 4 - [1687331790.438796][3951:3953] CHIP:TOO: [6]: 5 - [1687331790.438853][3951:3953] CHIP:TOO: [7]: 6 - [1687331790.438937][3951:3953] CHIP:TOO: [8]: 7 - [1687331790.438995][3951:3953] CHIP:TOO: [9]: 8 - [1687331790.439075][3951:3953] CHIP:TOO: [10]: 9 - [1687331790.439139][3951:3953] CHIP:TOO: [11]: 10 - [1687331790.439203][3951:3953] CHIP:TOO: [12]: 65528 - [1687331790.439285][3951:3953] CHIP:TOO: [13]: 65529 - [1687331790.439348][3951:3953] CHIP:TOO: [14]: 65530 - [1687331790.439405][3951:3953] CHIP:TOO: [15]: 65531 - [1687331790.439485][3951:3953] CHIP:TOO: [16]: 65532 - [1687331790.439544][3951:3953] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -368,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: Read the global attribute: EventList. 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 ozoneconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0415 Attribute 0x0000_FFFA DataVersion: 2247512014 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -404,62 +327,10 @@ tests: constraints: type: list - - 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 ozoneconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0415 Attribute 0x0000_FFF9 DataVersion: 2247512014 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 ozoneconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0415 Attribute 0x0000_FFF8 DataVersion: 2247512014 - [1685966085.385829][11867:11869] 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" 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 931c82a4b28349..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 @@ -337,65 +337,6 @@ 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 - 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.E00 && !PCC.S.E01 && !PCC.S.E02 && @@ -596,107 +537,19 @@ tests: type: list contains: [0x10] + - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + - label: - "Step 5s: TH reads from the DUT the EventList attribute. 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 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) - - Below is the example log which is observed in the RPI platform the value may be differ based on the dut implementation. - - - [1686205705.406393][87308:87310] CHIP:DMG: InteractionModelRevision = 1 - [1686205705.406398][87308:87310] CHIP:DMG: } - [1686205705.406480][87308:87310] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0200 Attribute 0x0000_FFFA DataVersion: 1492393553 - [1686205705.406516][87308:87310] CHIP:TOO: EventList: 0 entries - [1686205705.406573][87308:87310] CHIP:EM: <<< [E:31574i S:8973 M:178548658 (Ack:33480356)] (S) Msg TX to 1:0000000000000001 [6D93] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1686205705.406586][87308:87310] CHIP:IN: (S) Sending msg 178548658 on secure session with LSID: 8973 - [1686205705.406613][87308:87310] CHIP:EM: Flushed pending ack for MessageCounter:33480356 on exchange 31574i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - 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 - 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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + "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 1ea2ab1c48abe4..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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 pm1concentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1685965930.706971][11849:11851] CHIP:TOO: AttributeList: 17 entries - [1685965930.707011][11849:11851] CHIP:TOO: [1]: 0 - [1685965930.707045][11849:11851] CHIP:TOO: [2]: 1 - [1685965930.707076][11849:11851] CHIP:TOO: [3]: 2 - [1685965930.707107][11849:11851] CHIP:TOO: [4]: 3 - [1685965930.707138][11849:11851] CHIP:TOO: [5]: 4 - [1685965930.707169][11849:11851] CHIP:TOO: [6]: 5 - [1685965930.707200][11849:11851] CHIP:TOO: [7]: 6 - [1685965930.707231][11849:11851] CHIP:TOO: [8]: 7 - [1685965930.707262][11849:11851] CHIP:TOO: [9]: 8 - [1685965930.707293][11849:11851] CHIP:TOO: [10]: 9 - [1685965930.707324][11849:11851] CHIP:TOO: [11]: 10 - [1685965930.707356][11849:11851] CHIP:TOO: [12]: 65528 - [1685965930.707387][11849:11851] CHIP:TOO: [13]: 65529 - [1685965930.707418][11849:11851] CHIP:TOO: [14]: 65530 - [1685965930.707449][11849:11851] CHIP:TOO: [15]: 65531 - [1685965930.707480][11849:11851] CHIP:TOO: [16]: 65532 - [1685965930.707511][11849:11851] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 pm1concentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042C Attribute 0x0000_FFFA DataVersion: 435533597 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,62 +327,10 @@ tests: constraints: type: list - - 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 pm1concentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042C Attribute 0x0000_FFF9 DataVersion: 435533597 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 pm1concentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042C Attribute 0x0000_FFF8 DataVersion: 435533597 - [1685966085.385829][11867:11869] 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" 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 e5a30836467c32..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 @@ -42,15 +42,12 @@ tests: - 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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 pm25concentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1685965930.706971][11849:11851] CHIP:TOO: AttributeList: 17 entries - [1685965930.707011][11849:11851] CHIP:TOO: [1]: 0 - [1685965930.707045][11849:11851] CHIP:TOO: [2]: 1 - [1685965930.707076][11849:11851] CHIP:TOO: [3]: 2 - [1685965930.707107][11849:11851] CHIP:TOO: [4]: 3 - [1685965930.707138][11849:11851] CHIP:TOO: [5]: 4 - [1685965930.707169][11849:11851] CHIP:TOO: [6]: 5 - [1685965930.707200][11849:11851] CHIP:TOO: [7]: 6 - [1685965930.707231][11849:11851] CHIP:TOO: [8]: 7 - [1685965930.707262][11849:11851] CHIP:TOO: [9]: 8 - [1685965930.707293][11849:11851] CHIP:TOO: [10]: 9 - [1685965930.707324][11849:11851] CHIP:TOO: [11]: 10 - [1685965930.707356][11849:11851] CHIP:TOO: [12]: 65528 - [1685965930.707387][11849:11851] CHIP:TOO: [13]: 65529 - [1685965930.707418][11849:11851] CHIP:TOO: [14]: 65530 - [1685965930.707449][11849:11851] CHIP:TOO: [15]: 65531 - [1685965930.707480][11849:11851] CHIP:TOO: [16]: 65532 - [1685965930.707511][11849:11851] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 pm25concentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042A Attribute 0x0000_FFFA DataVersion: 3260928085 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,62 +327,10 @@ tests: constraints: type: list - - 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 pm25concentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042A Attribute 0x0000_FFF9 DataVersion: 3260928085 - [1685966056.111377][11860:11862] 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 7b: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 pm25concentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042A Attribute 0x0000_FFF8 DataVersion: 3260928085 - [1685966085.385829][11867:11869] 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" 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 7184fa2ffd1079..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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: 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 pm10concentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1685965930.706971][11849:11851] CHIP:TOO: AttributeList: 17 entries - [1685965930.707011][11849:11851] CHIP:TOO: [1]: 0 - [1685965930.707045][11849:11851] CHIP:TOO: [2]: 1 - [1685965930.707076][11849:11851] CHIP:TOO: [3]: 2 - [1685965930.707107][11849:11851] CHIP:TOO: [4]: 3 - [1685965930.707138][11849:11851] CHIP:TOO: [5]: 4 - [1685965930.707169][11849:11851] CHIP:TOO: [6]: 5 - [1685965930.707200][11849:11851] CHIP:TOO: [7]: 6 - [1685965930.707231][11849:11851] CHIP:TOO: [8]: 7 - [1685965930.707262][11849:11851] CHIP:TOO: [9]: 8 - [1685965930.707293][11849:11851] CHIP:TOO: [10]: 9 - [1685965930.707324][11849:11851] CHIP:TOO: [11]: 10 - [1685965930.707356][11849:11851] CHIP:TOO: [12]: 65528 - [1685965930.707387][11849:11851] CHIP:TOO: [13]: 65529 - [1685965930.707418][11849:11851] CHIP:TOO: [14]: 65530 - [1685965930.707449][11849:11851] CHIP:TOO: [15]: 65531 - [1685965930.707480][11849:11851] CHIP:TOO: [16]: 65532 - [1685965930.707511][11849:11851] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 pm10concentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042D Attribute 0x0000_FFFA DataVersion: 3341825536 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,62 +327,10 @@ tests: constraints: type: list - - 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 pm10concentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042D Attribute 0x0000_FFF9 DataVersion: 3341825536 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - 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 pm10concentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042D Attribute 0x0000_FFF8 DataVersion: 3341825536 - [1685966085.385829][11867:11869] 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" 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 c0d8aa716b2a09..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 @@ -136,128 +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 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 5: TH reads from the DUT the EventList attribute. 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 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: - Below is the example log which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1686210799.291240][88805:88807] CHIP:DMG: } - [1686210799.291272][88805:88807] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0403 Attribute 0x0000_FFFA DataVersion: 897514884 - [1686210799.291292][88805:88807] CHIP:TOO: EventList: 0 entries - [1686210799.291317][88805:88807] CHIP:EM: <<< [E:36299i S:44480 M:65231550 (Ack:23015388)] (S) Msg TX to 1:0000000000000001 [6D93] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1686210799.291321][88805:88807] CHIP:IN: (S) Sending msg 65231550 on secure session with LSID: 44480 - [1686210799.291331][88805:88807] CHIP:EM: Flushed pending ack for MessageCounter:23015388 on exchange 36299i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - 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 - 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 - 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 daf03596787564..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,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 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 && PICS_EVENT_LIST_ENABLED - 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_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index a7c768b7d70c4f..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,32 +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 && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" 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 a13b45da41082a..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,90 +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_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 47c2f78e3c9ad3..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,24 +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" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - 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 34fc1cd767ad2d..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 @@ -313,55 +310,7 @@ tests: type: list excludes: [10] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4l: TH reads the AttributeList attribute from the 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 radonconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1687339472.989878][5068:5070] CHIP:TOO: AttributeList: 17 entries - [1687339472.989951][5068:5070] CHIP:TOO: [1]: 0 - [1687339472.990012][5068:5070] CHIP:TOO: [2]: 1 - [1687339472.990070][5068:5070] CHIP:TOO: [3]: 2 - [1687339472.990128][5068:5070] CHIP:TOO: [4]: 3 - [1687339472.990186][5068:5070] CHIP:TOO: [5]: 4 - [1687339472.990243][5068:5070] CHIP:TOO: [6]: 5 - [1687339472.990301][5068:5070] CHIP:TOO: [7]: 6 - [1687339472.990358][5068:5070] CHIP:TOO: [8]: 7 - [1687339472.990415][5068:5070] CHIP:TOO: [9]: 8 - [1687339472.990473][5068:5070] CHIP:TOO: [10]: 9 - [1687339472.990531][5068:5070] CHIP:TOO: [11]: 10 - [1687339472.990590][5068:5070] CHIP:TOO: [12]: 65528 - [1687339472.990648][5068:5070] CHIP:TOO: [13]: 65529 - [1687339472.990707][5068:5070] CHIP:TOO: [14]: 65530 - [1687339472.990765][5068:5070] CHIP:TOO: [15]: 65531 - [1687339472.990824][5068:5070] CHIP:TOO: [16]: 65532 - [1687339472.990882][5068:5070] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 radonconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042F Attribute 0x0000_FFFA DataVersion: 3741862926 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,64 +327,10 @@ tests: constraints: type: list - - label: - "Step 6b: Read the global attribute AcceptedCommandList. 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 radonconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042F Attribute 0x0000_FFF9 DataVersion: 3741862926 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - label: - "Step 7b: Read the global attribute: GeneratedCommandList. 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 radonconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042F Attribute 0x0000_FFF8 DataVersion: 3741862926 - [1685966085.385829][11867:11869] 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" 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 b2944016faeebc..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 @@ -110,49 +110,7 @@ tests: type: list excludes: [3] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4d: TH reads the AttributeList attribute from the 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 rvccleanmode 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.A0002(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: - - [1690182240.730688][14970:14972] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_FFFB DataVersion: 3145953005 - [1690182240.730708][14970:14972] CHIP:TOO: AttributeList: 10 entries - [1690182240.730713][14970:14972] CHIP:TOO: [1]: 0 - [1690182240.730716][14970:14972] CHIP:TOO: [2]: 1 - [1690182240.730719][14970:14972] CHIP:TOO: [3]: 2 - [1690182240.730722][14970:14972] CHIP:TOO: [4]: 3 - [1690182240.730725][14970:14972] CHIP:TOO: [5]: 65528 - [1690182240.730728][14970:14972] CHIP:TOO: [6]: 65529 - [1690182240.730731][14970:14972] CHIP:TOO: [7]: 65530 - [1690182240.730734][14970:14972] CHIP:TOO: [8]: 65531 - [1690182240.730737][14970:14972] CHIP:TOO: [9]: 65532 - [1690182240.730740][14970:14972] 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: Read the global attribute: EventList from the DUT" + - label: "Step 5: Read the global attribute: EventList from the DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -162,35 +120,7 @@ tests: type: list - label: - "Step 5b: Read the global attribute: EventList from the 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 rvccleanmode 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: - - [1690182289.222668][14980:14982] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_FFFA DataVersion: 3145953005 - [1690182289.222680][14980:14982] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6a: Read the global attribute AcceptedCommandList. Check if it + "Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)" PICS: RVCCLEANM.S.C00.Rsp command: "readAttribute" @@ -201,35 +131,7 @@ tests: type: list - label: - "Step 6b: Read the global attribute AcceptedCommandList. 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 rvccleanmode 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: - - [1690182317.442730][14983:14985] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_FFF9 DataVersion: 3145953005 - [1690182317.442800][14983:14985] CHIP:TOO: AcceptedCommandList: 1 entries - [1690182317.442827][14983:14985] CHIP:TOO: [1]: 0 - 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: Read the global attribute: GeneratedCommandList. Check if it + "Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)" PICS: RVCCLEANM.S.C01.Tx command: "readAttribute" @@ -238,31 +140,3 @@ tests: value: [1] constraints: type: list - - - label: - "Step 7b: Read the global attribute: GeneratedCommandList. 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 rvccleanmode 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: - - [1690182346.463002][14993:14995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0055 Attribute 0x0000_FFF8 DataVersion: 3145953005 - [1690182346.463028][14993:14995] CHIP:TOO: GeneratedCommandList: 1 entries - [1690182346.463039][14993:14995] CHIP:TOO: [1]: 1 - 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_RVCCLEANM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml new file mode 100644 index 00000000000000..bde5980061e3e5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_1_2.yaml @@ -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. +# 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: "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 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 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 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 derived cluster tag value (DeepClean(0x4000), Vacuum(0x4001), Mop(0x4002)) 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 Vacuum(0x4001) mode tag or the Mop(0x4002)mode tag in the ModeTags 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.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 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 from supported_modes_dut or 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 from supported_modes_dut or null, 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 new file mode 100644 index 00000000000000..5f16be922706ba --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_2_1.yaml @@ -0,0 +1,241 @@ +# 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: RVCCLEANM.S.M.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: RVCCLEANM.S.M.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 (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 CleaningInProgress(0X40) status response and StatusText field has a length between 1 to 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..3ffc3454e12766 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,88 @@ 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 - - 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 + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: old_current_mode_dut + constraints: + type: int8u + minValue: 0 + maxValue: 254 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." 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" 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 new file mode 100644 index 00000000000000..a878da5691c923 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCCLEANM_3_2.yaml @@ -0,0 +1,203 @@ +# 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: "Preconditions" + verification: | + !RVCCLEANM.S.F00(DEPONOFF) | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL + 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_RVCRUNM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_1.yaml index 376e2b661b6f83..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 @@ -110,49 +110,7 @@ tests: type: list excludes: [3] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "Step 4e: Check for mandatory attributes in 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 rvcrunmode 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.A0002(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: - - [1690177332.943953][6264:6266] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_FFFB DataVersion: 551764487 - [1690177332.944121][6264:6266] CHIP:TOO: AttributeList: 10 entries - [1690177332.944191][6264:6266] CHIP:TOO: [1]: 0 - [1690177332.944255][6264:6266] CHIP:TOO: [2]: 1 - [1690177332.944312][6264:6266] CHIP:TOO: [3]: 2 - [1690177332.944368][6264:6266] CHIP:TOO: [4]: 3 - [1690177332.944425][6264:6266] CHIP:TOO: [5]: 65528 - [1690177332.944482][6264:6266] CHIP:TOO: [6]: 65529 - [1690177332.944538][6264:6266] CHIP:TOO: [7]: 65530 - [1690177332.944594][6264:6266] CHIP:TOO: [8]: 65531 - [1690177332.944650][6264:6266] CHIP:TOO: [9]: 65532 - [1690177332.944707][6264:6266] 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: Read the global attribute: EventList from the DUT" + - label: "Step 5: Read the global attribute: EventList from the DUT" PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" @@ -162,35 +120,7 @@ tests: type: list - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 rvcrunmode 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: - - [1690177367.986733][6269:6271] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_FFFA DataVersion: 551764487 - [1690177367.986879][6269:6271] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "Step 6a: Read the global attribute AcceptedCommandList. Check if it + "Step 6: Read the global attribute AcceptedCommandList. Check if it contains id 0x0 (ChangeToMode)" PICS: RVCRUNM.S.C00.Rsp command: "readAttribute" @@ -201,35 +131,7 @@ tests: type: list - label: - "Step 6b: Read the global attribute AcceptedCommandList. 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 rvcrunmode 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: - - [1690177423.741225][6275:6277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_FFF9 DataVersion: 551764487 - [1690177423.741380][6275:6277] CHIP:TOO: AcceptedCommandList: 1 entries - [1690177423.741452][6275:6277] CHIP:TOO: [1]: 0 - 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: Read the global attribute: GeneratedCommandList. Check if it + "Step 7: Read the global attribute: GeneratedCommandList. Check if it contains id 0x1 (ChangeToModeResponse)" PICS: RVCRUNM.S.C01.Tx command: "readAttribute" @@ -238,31 +140,3 @@ tests: value: [1] constraints: type: list - - - label: - "Step 7b: Read the global attribute: GeneratedCommandList. 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 rvcrunmode 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: - - [1690177455.913441][6278:6280] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_FFF8 DataVersion: 551764487 - [1690177455.913595][6278:6280] CHIP:TOO: GeneratedCommandList: 1 entries - [1690177455.913666][6278:6280] CHIP:TOO: [1]: 1 - 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_RVCRUNM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml new file mode 100644 index 00000000000000..5e699c00a4ce9b --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_1_2.yaml @@ -0,0 +1,113 @@ +# 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: "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 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 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 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)) a defined cluster derived tag value (Idle(0x4000), Cleaning(0x4001)) 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 the Idle(0x4000) mode tag in the ModeTags field + - Verify that at least one ModeOptionsStruct entry includes the Cleaning(0x4001) mode tag in the ModeTags field + - Verify that none of the ModeOptionsStruct entries include both the Idle(0x4000) mode tag and the Cleaning(0x4001) mode tag in the ModeTags 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 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 or 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 and value is from supported_modes_dut or null, 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 new file mode 100644 index 00000000000000..3e96b215b81fa6 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_2_1.yaml @@ -0,0 +1,215 @@ +# 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: RVCRUNM.S.M.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: RVCRUNM.S.M.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 to 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..bfd9e262eeabf2 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 @@ -57,7 +57,7 @@ tests: verification: | ./chip-tool rvcrunmode 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 [1690265382.010747][30073:30075] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0003 DataVersion: 172461204 @@ -72,7 +72,7 @@ tests: 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. + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. [1690179152.516820][6454:6456] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0054 Attribute 0x0000_0001 DataVersion: 2795852718 [1690179152.516952][6454:6456] CHIP:TOO: CurrentMode: 0 @@ -86,7 +86,7 @@ tests: 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: + - 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 @@ -162,7 +162,7 @@ tests: 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 + On TH(chip-tool), Verify that CurrentMode attribute value is an integer 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 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 new file mode 100644 index 00000000000000..7ad4b2d59f0880 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_RVCRUNM_3_2.yaml @@ -0,0 +1,223 @@ +# 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: | + !RVCRUNM.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-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: }, + + ./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 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_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..e14c009653513d 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,8 +99,8 @@ 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" + "Step 6: TH waits for a report of SmokeState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0001 command: "waitForReport" attribute: "SmokeState" @@ -108,7 +110,7 @@ tests: constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -117,15 +119,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 +138,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 +147,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 +163,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,8 +179,8 @@ 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" + "Step 15: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" PICS: SMOKECO.S.A0001 command: "waitForReport" attribute: "SmokeState" @@ -188,7 +190,7 @@ tests: constraints: type: enum8 - - 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 +199,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,8 +224,8 @@ 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" + "Step 19: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" PICS: SMOKECO.S.A0001 command: "waitForReport" attribute: "SmokeState" @@ -233,7 +235,7 @@ tests: constraints: type: enum8 - - 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 +244,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..e4117df2fc67d1 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,8 +98,8 @@ 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" + "Step 6: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0002 command: "waitForReport" attribute: "COState" @@ -107,7 +109,7 @@ tests: constraints: type: enum8 - - 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 +118,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 +137,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 +146,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 +162,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,8 +178,8 @@ 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" + "Step 15: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0002 command: "waitForReport" attribute: "COState" @@ -187,7 +189,7 @@ tests: constraints: type: enum8 - - 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 +198,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,8 +223,8 @@ 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" + "Step 19: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0002 command: "waitForReport" attribute: "COState" @@ -232,7 +234,7 @@ tests: constraints: type: enum8 - - 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 +243,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..db40c617cbef1c 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,8 +111,8 @@ 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" + "Step 6: TH waits for a report of BatteryAlert attribute from DUT with + a timeout of 300 seconds" PICS: SMOKECO.S.A0003 command: "waitForReport" attribute: "BatteryAlert" @@ -120,7 +122,7 @@ tests: constraints: type: enum8 - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 7: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -129,17 +131,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,8 +156,8 @@ 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" + "Step 10: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" PICS: SMOKECO.S.A0003 command: "waitForReport" attribute: "BatteryAlert" @@ -165,7 +167,7 @@ tests: constraints: type: enum8 - - 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 +176,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,8 +201,8 @@ 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" + "Step 14: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" PICS: SMOKECO.S.A0003 command: "waitForReport" attribute: "BatteryAlert" @@ -210,7 +212,7 @@ tests: constraints: type: enum8 - - 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 +221,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,8 +257,8 @@ 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" + "Step 19: TH waits for a report of HardwareFaultAlert attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0006 command: "waitForReport" attribute: "HardwareFaultAlert" @@ -266,7 +268,7 @@ tests: constraints: type: boolean - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 20: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -275,17 +277,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,8 +303,8 @@ 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" + "Step 23: TH waits for a report of HardwareFaultAlert attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0006 command: "waitForReport" attribute: "HardwareFaultAlert" @@ -312,7 +314,7 @@ tests: constraints: type: boolean - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 24: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -321,28 +323,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,8 +359,8 @@ 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" + "Step 28: TH waits for a report of EndOfServiceAlert attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0007 command: "waitForReport" attribute: "EndOfServiceAlert" @@ -368,7 +370,7 @@ tests: constraints: type: enum8 - - 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 +379,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,8 +405,8 @@ 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" + "Step 32: TH waits for a report of EndOfServiceAlert attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0007 command: "waitForReport" attribute: "EndOfServiceAlert" @@ -414,7 +416,7 @@ tests: constraints: type: enum8 - - 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 +425,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 +453,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 +467,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 +478,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 +488,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 +499,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,21 +516,21 @@ 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" + "Step 45: TH waits for a report of TestInProgress attribute from DUT + with a timeout of 180 seconds" PICS: SMOKECO.S.A0005 command: "waitForReport" attribute: "TestInProgress" @@ -536,7 +540,7 @@ tests: constraints: type: boolean - - label: "TH reads ExpressedState attribute from DUT" + - label: "Step 46: TH reads ExpressedState attribute from DUT" PICS: SMOKECO.S.A0000 command: "readAttribute" attribute: "ExpressedState" @@ -546,8 +550,8 @@ tests: type: enum8 - label: - "TH waits for a report of TestInProgress attribute from DUT with a - timeout of 180 seconds" + "Step 47: 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 +561,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 +578,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..1556ab5b2f49b9 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,8 +146,8 @@ 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" + "Step 6: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0008 command: "waitForReport" attribute: "InterconnectSmokeAlarm" @@ -156,15 +159,15 @@ tests: minValue: 1 maxValue: 2 - - 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 } - - 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 +177,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,8 +194,8 @@ 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" + "Step 10: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0008 command: "waitForReport" attribute: "InterconnectSmokeAlarm" @@ -202,7 +205,7 @@ tests: constraints: type: enum8 - - 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 +214,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 +243,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,8 +259,8 @@ 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" + "Step 16: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0009 command: "waitForReport" attribute: "InterconnectCOAlarm" @@ -269,15 +272,15 @@ tests: minValue: 1 maxValue: 2 - - 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 } - - 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 +290,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,8 +307,8 @@ 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" + "Step 20: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0009 command: "waitForReport" attribute: "InterconnectCOAlarm" @@ -315,7 +318,7 @@ tests: constraints: type: enum8 - - 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 +327,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,8 +364,8 @@ 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" + "Step 25: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000a command: "waitForReport" attribute: "ContaminationState" @@ -374,8 +377,8 @@ tests: maxValue: 3 - 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,8 +394,8 @@ 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" + "Step 27: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000a command: "waitForReport" attribute: "ContaminationState" @@ -403,8 +406,8 @@ tests: type: enum8 - 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,8 +423,8 @@ 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" + "Step 29: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000a command: "waitForReport" attribute: "ContaminationState" @@ -432,8 +435,8 @@ tests: type: enum8 - 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,8 +452,8 @@ 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" + "Step 31: TH waits for a report of ContaminationState attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000a command: "waitForReport" attribute: "ContaminationState" @@ -460,20 +463,21 @@ tests: constraints: type: enum8 - - 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,8 +493,8 @@ 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" + "Step 34: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000b command: "waitForReport" attribute: "SmokeSensitivityLevel" @@ -501,8 +505,8 @@ tests: type: enum8 - 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,8 +522,8 @@ 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" + "Step 36: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000b command: "waitForReport" attribute: "SmokeSensitivityLevel" @@ -530,8 +534,8 @@ tests: type: enum8 - 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,8 +551,8 @@ 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" + "Step 38: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000b command: "waitForReport" attribute: "SmokeSensitivityLevel" @@ -559,8 +563,8 @@ tests: type: enum8 - 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,8 +580,8 @@ 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" + "Step 40: TH waits for a report of SmokeSensitivityLevel attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A000b command: "waitForReport" attribute: "SmokeSensitivityLevel" @@ -587,18 +591,18 @@ tests: constraints: type: enum8 - - 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 +611,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,8 +639,8 @@ 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" + "Step 45: 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" @@ -647,9 +650,16 @@ tests: constraints: type: enum8 + - 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,8 +674,8 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" + "Step 47: 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" @@ -675,17 +685,17 @@ tests: constraints: type: enum8 - - 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,8 +711,8 @@ 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" + "Step 50: 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" @@ -712,17 +722,24 @@ tests: constraints: type: enum8 - - 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,8 +754,8 @@ 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" + "Step 53: 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" @@ -749,8 +766,8 @@ tests: type: enum8 - 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 +781,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 +799,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,9 +823,9 @@ 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 + "Step 57: 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 @@ -810,7 +834,7 @@ tests: constraints: type: enum8 - - 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 +843,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,8 +871,8 @@ 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" + "Step 61: 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" @@ -859,9 +882,16 @@ tests: constraints: type: enum8 + - 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,8 +906,8 @@ tests: value: TEST_EVENT_TRIGGER_DEVICE_MUTED - label: - "TH waits for a report of DeviceMuted attribute from DUT with a - timeout of 120 seconds" + "Step 63: 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" @@ -887,17 +917,17 @@ tests: constraints: type: enum8 - - 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,8 +943,8 @@ 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" + "Step 66: 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" @@ -924,17 +954,24 @@ tests: constraints: type: enum8 - - 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,8 +986,8 @@ 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" + "Step 69: 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" @@ -961,8 +998,8 @@ tests: type: enum8 - 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 +1013,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 +1031,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,8 +1055,8 @@ 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" + "Step 73: 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" 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..870c8f5c850acb 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,8 +182,8 @@ 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" + "Step 10: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" PICS: SMOKECO.S.A0003 command: "waitForReport" attribute: "BatteryAlert" @@ -190,8 +194,16 @@ tests: type: enum8 - 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,8 +219,8 @@ 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" + "Step 12: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0008 command: "waitForReport" attribute: "InterconnectSmokeAlarm" @@ -219,9 +231,16 @@ tests: minValue: 1 maxValue: 2 + - 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,8 +255,8 @@ 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" + "Step 14: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0009 command: "waitForReport" attribute: "InterconnectCOAlarm" @@ -248,9 +267,16 @@ tests: minValue: 1 maxValue: 2 + - 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,8 +291,8 @@ 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" + "Step 16: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0002 command: "waitForReport" attribute: "COState" @@ -276,9 +302,16 @@ tests: constraints: type: enum8 + - 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,8 +326,8 @@ 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" + "Step 18: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" PICS: SMOKECO.S.A0001 command: "waitForReport" attribute: "SmokeState" @@ -304,7 +337,7 @@ tests: constraints: type: enum8 - - 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 +347,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,8 +363,8 @@ 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" + "Step 21: TH waits for a report of SmokeState attribute from DUT with + a timeout of 300 seconds" PICS: SMOKECO.S.A0001 command: "waitForReport" attribute: "SmokeState" @@ -341,7 +374,7 @@ tests: constraints: type: enum8 - - 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 +383,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,8 +407,8 @@ 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" + "Step 24: TH waits for a report of COState attribute from DUT with a + timeout of 300 seconds" PICS: SMOKECO.S.A0002 command: "waitForReport" attribute: "COState" @@ -378,7 +418,7 @@ tests: constraints: type: enum8 - - 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 +427,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,8 +452,8 @@ 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" + "Step 27: TH waits for a report of InterconnectCOAlarm attribute from + DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0009 command: "waitForReport" attribute: "InterconnectCOAlarm" @@ -416,7 +463,7 @@ tests: constraints: type: enum8 - - 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 +473,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,8 +498,8 @@ 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" + "Step 30: TH waits for a report of InterconnectSmokeAlarm attribute + from DUT with a timeout of 300 seconds" PICS: SMOKECO.S.A0008 command: "waitForReport" attribute: "InterconnectSmokeAlarm" @@ -454,7 +509,7 @@ tests: constraints: type: enum8 - - 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 +518,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,8 +542,8 @@ 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" + "Step 33: TH waits for a report of BatteryAlert attribute from DUT + with a timeout of 300 seconds" PICS: SMOKECO.S.A0003 command: "waitForReport" attribute: "BatteryAlert" @@ -491,7 +553,7 @@ tests: constraints: type: enum8 - - 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_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index ea76d9b267cd75..14e4014e3e2157 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,92 +11,112 @@ # WITHOUT 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 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: - - [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 + command: "readAttribute" + attribute: "FeatureMap" + PICS: "!TCCM.S.F00" + response: + value: 0 + constraints: + type: bitmap32 - - 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..1f428f9c407901 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 @@ -26,20 +26,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 +85,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..a27a8f2400623a 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 @@ -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..a7b94787d6ed7d 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 @@ -117,7 +117,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 +131,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 b86b24051b7926..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,111 +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..286f41e28396b0 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,13 +27,18 @@ 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 TemperatureSetpoint attribute" - PICS: TCTL.S.A0000 + - label: "Step 2: TH reads from the DUT the MinTemperature attribute" + PICS: TCTL.S.A0001 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. @@ -46,11 +51,11 @@ 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 3: TH reads from the DUT the MinTemperature attribute" - PICS: TCTL.S.A0001 + - label: "Step 3: TH reads from the DUT the MaxTemperature attribute" + PICS: TCTL.S.A0002 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,8 +65,8 @@ 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" - PICS: TCTL.S.A0002 + - label: "Step 4: TH reads from the DUT the TemperatureSetpoint attribute" + PICS: TCTL.S.A0000 verification: | ./chip-tool temperaturecontrol read max-temperature 1 1 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 57b5be93ad9170..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 @@ -249,59 +249,6 @@ tests: constraints: excludes: [0x0003] - #List values range check support https://github.com/project-chip/connectedhomeip/issues/26570 - - label: - "TS4: Check for mandatory attributes in 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 timesynchronization read attribute-list 1 0 - - Via the TH (chip-tool), verify: - -that AttributeList attribute contains list of supported attributes. - -that the list has mandatory attributes, optional attributes, supported features and Global attributes. - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1688648771.261160][149504:149506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFFB DataVersion: 1776331179 - [1688648771.261232][149504:149506] CHIP:TOO: AttributeList: 18 entries - [1688648771.261237][149504:149506] CHIP:TOO: [1]: 0 - [1688648771.261240][149504:149506] CHIP:TOO: [2]: 1 - [1688648771.261242][149504:149506] CHIP:TOO: [3]: 2 - [1688648771.261245][149504:149506] CHIP:TOO: [4]: 3 - [1688648771.261248][149504:149506] CHIP:TOO: [5]: 4 - [1688648771.261251][149504:149506] CHIP:TOO: [6]: 5 - [1688648771.261253][149504:149506] CHIP:TOO: [7]: 6 - [1688648771.261256][149504:149506] CHIP:TOO: [8]: 7 - [1688648771.261259][149504:149506] CHIP:TOO: [9]: 8 - [1688648771.261262][149504:149506] CHIP:TOO: [10]: 10 - [1688648771.261265][149504:149506] CHIP:TOO: [11]: 11 - [1688648771.261268][149504:149506] CHIP:TOO: [12]: 12 - [1688648771.261270][149504:149506] CHIP:TOO: [13]: 65528 - [1688648771.261273][149504:149506] CHIP:TOO: [14]: 65529 - [1688648771.261276][149504:149506] CHIP:TOO: [15]: 65530 - [1688648771.261279][149504:149506] CHIP:TOO: [16]: 65531 - [1688648771.261282][149504:149506] CHIP:TOO: [17]: 65532 - [1688648771.261284][149504:149506] CHIP:TOO: [18]: 65533 - [1688648771.261316][149504:149506] CHIP:EM: <<< [E:655i S:4249 M:65517419 (Ack:79799053)] (S) Msg TX to 1:0000000000000001 [3784] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688648771.261321][149504:149506] CHIP:IN: (S) Sending msg 65517419 on secure session with LSID: 4249 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - # Note - additional exclusions not handled here ########################## @@ -350,51 +297,6 @@ tests: constraints: excludes: [0x04] - - label: - "TS5: TH reads from the DUT the EventList attribute. 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 timesynchronization read event-list 1 0 - - Via the TH (chip-tool), verify: - The list SHALL include all the mandatory entries: 0x03 - The list include entries based on feature support: - 0x00 SHALL be included if and only if TIMESYNC.S.F00(TZ) - 0x01 SHALL be included if and only if TIMESYNC.S.F00(TZ) - 0x02 SHALL be included if and only if TIMESYNC.S.F00(TZ) - 0x04 SHALL be included if and only if TIMESYNC.S.F03(TSC) - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1688648817.829533][149513:149515] CHIP:DMG: } - [1688648817.829584][149513:149515] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFFA DataVersion: 1776331179 - [1688648817.829600][149513:149515] CHIP:TOO: EventList: 5 entries - [1688648817.829606][149513:149515] CHIP:TOO: [1]: 0 - [1688648817.829607][149513:149515] CHIP:TOO: [2]: 1 - [1688648817.829609][149513:149515] CHIP:TOO: [3]: 2 - [1688648817.829610][149513:149515] CHIP:TOO: [4]: 3 - [1688648817.829612][149513:149515] CHIP:TOO: [5]: 4 - [1688648817.829644][149513:149515] CHIP:EM: <<< [E:37598i S:15729 M:18516326 (Ack:233541454)] (S) Msg TX to 1:0000000000000001 [3784] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688648817.829648][149513:149515] CHIP:IN: (S) Sending msg 18516326 on secure session with LSID: 15729 - [1688648817.829657][149513:149515] CHIP:EM: Flushed pending ack for MessageCounter:233541454 on exchange 37598i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - # Note - additional exclusions not handled here ########################## @@ -462,44 +364,6 @@ tests: constraints: excludes: [0x01] - - label: - "TS6: Check for mandatory commands in AcceptedCommandList. 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 timesynchronization read accepted-command-list 1 0 - - Via the TH (chip-tool), verify: - -that AcceptedCommandList attribute contains list of supported commands and that list has 5 entries . - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1688648876.860364][149529:149531] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFF9 DataVersion: 1776331179 - [1688648876.860405][149529:149531] CHIP:TOO: AcceptedCommandList: 5 entries - [1688648876.860415][149529:149531] CHIP:TOO: [1]: 0 - [1688648876.860421][149529:149531] CHIP:TOO: [2]: 1 - [1688648876.860427][149529:149531] CHIP:TOO: [3]: 2 - [1688648876.860433][149529:149531] CHIP:TOO: [4]: 4 - [1688648876.860439][149529:149531] CHIP:TOO: [5]: 5 - [1688648876.860502][149529:149531] CHIP:EM: <<< [E:14853i S:24555 M:248733556 (Ack:60358064)] (S) Msg TX to 1:0000000000000001 [3784] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688648876.860516][149529:149531] CHIP:IN: (S) Sending msg 248733556 on secure session with LSID: 24555 - [1688648876.860554][149529:149531] CHIP:EM: Flushed pending ack for MessageCounter:60358064 on exchange 14853i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - # NOTE: exclusions not checked ########################## @@ -522,39 +386,3 @@ tests: response: constraints: excludes: [0x03] - - - label: - "TS7: Check for mandatory commands in GeneratedCommandList. 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 timesynchronization read generated-command-list 1 0 - - Via the TH (chip-tool), verify: - -that GeneratedCommandList attribute contains list of supported commands. - -that list has 1(command id-3) entries for this cluster based on DUT implementation. - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1688648846.603041][149522:149524] CHIP:DMG: } - [1688648846.603137][149522:149524] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0038 Attribute 0x0000_FFF8 DataVersion: 1776331179 - [1688648846.603172][149522:149524] CHIP:TOO: GeneratedCommandList: 1 entries - [1688648846.603183][149522:149524] CHIP:TOO: [1]: 3 - [1688648846.603255][149522:149524] CHIP:EM: <<< [E:41394i S:2765 M:235105515 (Ack:166644135)] (S) Msg TX to 1:0000000000000001 [3784] --- Type 0000:10 (SecureChannel:StandaloneAck) - [1688648846.603270][149522:149524] CHIP:IN: (S) Sending msg 235105515 on secure session with LSID: 2765 - [1688648846.603316][149522:149524] CHIP:EM: Flushed pending ack for MessageCounter:166644135 on exchange 41394i - 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_TMP_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml index 52792256be90dc..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,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 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 && PICS_EVENT_LIST_ENABLED - 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 cefd166e28065b..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,26 +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 && PICS_EVENT_LIST_ENABLED - 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_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 5880ab6abd29d4..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 @@ -65,50 +65,7 @@ tests: type: list contains: [0, 1, 2, 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 thermostatuserinterfaceconfiguration read attribute-list 1 1 - - Via the TH (chip-tool), verify: - - that AttributeList attribute contains list of supported attributes. - -that the list has mandatory attributes, Tolerance attribute (If that optional attribute is true) and global attributes. - - Below is the example value which is observed in the RPI platform the value may be differ based on the dut implementation. - - [1676293075.930307][3422:3424] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFFB DataVersion: 1373411682 - [1676293075.930387][3422:3424] CHIP:TOO: AttributeList: 9 entries - [1676293075.930414][3422:3424] CHIP:TOO: [1]: 0 - [1676293075.930437][3422:3424] CHIP:TOO: [2]: 1 - [1676293075.930458][3422:3424] CHIP:TOO: [3]: 2 - [1676293075.930480][3422:3424] CHIP:TOO: [4]: 65528 - [1676293075.930502][3422:3424] CHIP:TOO: [5]: 65529 - [1676293075.930524][3422:3424] CHIP:TOO: [6]: 65530 - [1676293075.930547][3422:3424] CHIP:TOO: [7]: 65531 - [1676293075.930569][3422:3424] CHIP:TOO: [8]: 65532 - [1676293075.930590][3422:3424] CHIP:TOO: [9]: 65533 - [1676293075.930795][3422:3424] CHIP:EM: <<< [E:40240i M:140476277 (Ack:118115868)] (S) Msg TX to 1:000000 - 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: Read the global attribute: AcceptedCommandList" + - label: "Step 5: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -116,37 +73,7 @@ tests: constraints: type: list - - label: - "Step 5b: Read the global attribute: AcceptedCommandList. 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 thermostatuserinterfaceconfiguration read accepted-command-list 1 1 - - Via the TH (chip-tool), verify: - -that AcceptedCommandList attribute contains list of supported commands. - -that list has empty(0 entries) for this cluster and it may contain manufacturer specific command IDs. - - [1653990551.782477][6688:6693] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFF9 DataVersion: 398536759 - [1653990551.782585][6688:6693] CHIP:TOO: AcceptedCommandList: 0 entries - [1653990551.782710][6688:6693] CHIP:EM: Sending Standalone Ack for MessageCounter:925369 on exchange 6142i - 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: Read the global attribute: GeneratedCommandList" + - label: "Step 6: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: @@ -154,56 +81,11 @@ tests: constraints: type: list - - label: - "Step 6b: Read the global attribute: GeneratedCommandList. 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 thermostatuserinterfaceconfiguration read generated-command-list 1 1 - - Via the TH (chip-tool), verify: - -that GeneratedCommandList attribute contains list of supported commands. - -that list has empty(0 entries) for this cluster. - - [1653990618.773396][6698:6703] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_FFF8 DataVersion: 398536759 - [1653990618.773518][6698:6703] CHIP:TOO: GeneratedCommandList: 0 entries - [1653990618.773666][6698:6703] CHIP:EM: Sending Standalone Ack for MessageCounter:161554 on exchange 23764i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #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 && PICS_EVENT_LIST_ENABLED - 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 ff5ef4e560d878..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,55 +310,7 @@ tests: type: list excludes: [10] - #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 totalvolatileorganiccompoundsconcentrationmeasurement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0009, 0xfff8, 0xfff9, 0xfffa, 0xfffb, 0xfffc & 0xfffd - - Optional entries:- 0x0007 - - Based on feature support:- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x000a - - [1687339255.386215][5005:5007] CHIP:TOO: AttributeList: 17 entries - [1687339255.386288][5005:5007] CHIP:TOO: [1]: 0 - [1687339255.386349][5005:5007] CHIP:TOO: [2]: 1 - [1687339255.386407][5005:5007] CHIP:TOO: [3]: 2 - [1687339255.386464][5005:5007] CHIP:TOO: [4]: 3 - [1687339255.386526][5005:5007] CHIP:TOO: [5]: 4 - [1687339255.386583][5005:5007] CHIP:TOO: [6]: 5 - [1687339255.386640][5005:5007] CHIP:TOO: [7]: 6 - [1687339255.386696][5005:5007] CHIP:TOO: [8]: 7 - [1687339255.386753][5005:5007] CHIP:TOO: [9]: 8 - [1687339255.386810][5005:5007] CHIP:TOO: [10]: 9 - [1687339255.386868][5005:5007] CHIP:TOO: [11]: 10 - [1687339255.386925][5005:5007] CHIP:TOO: [12]: 65528 - [1687339255.386983][5005:5007] CHIP:TOO: [13]: 65529 - [1687339255.387041][5005:5007] CHIP:TOO: [14]: 65530 - [1687339255.387098][5005:5007] CHIP:TOO: [15]: 65531 - [1687339255.387155][5005:5007] CHIP:TOO: [16]: 65532 - [1687339255.387213][5005:5007] CHIP:TOO: [17]: 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: Read the global attribute: EventList" + - label: "Step 5: Read the global attribute: EventList" command: "readAttribute" attribute: "EventList" PICS: PICS_EVENT_LIST_ENABLED @@ -370,35 +319,7 @@ tests: constraints: type: list - - label: - "Step 5b: TH reads from the DUT the EventList attribute. 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 totalvolatileorganiccompoundsconcentrationmeasurement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685965965.418394][11855:11857] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042E Attribute 0x0000_FFFA DataVersion: 1180043964 - [1685965965.418498][11855:11857] CHIP:TOO: EventList: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && PICS_EVENT_LIST_ENABLED - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Step 6a: Read the global attribute: AcceptedCommandList" + - label: "Step 6: Read the global attribute: AcceptedCommandList" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -406,64 +327,10 @@ tests: constraints: type: list - - label: - "Step 6b: Read the global attribute: AcceptedCommandList. 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 totalvolatileorganiccompoundsconcentrationmeasurement read accepted-command-list 1 1 - - Via the TH (chip-tool), verify that the AcceptedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966056.111188][11860:11862] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042E Attribute 0x0000_FFF9 DataVersion: 1180043964 - [1685966056.111377][11860:11862] 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 7a: Read the global attribute: GeneratedCommandList" + - label: "Step 7: Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - - label: - "Step 7b: Read the global attribute: GeneratedCommandList. 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 totalvolatileorganiccompoundsconcentrationmeasurement read generated-command-list 1 1 - - Via the TH (chip-tool), verify that the GeneratedCommandList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1685966085.385740][11867:11869] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_042E Attribute 0x0000_FFF8 DataVersion: 1180043964 - [1685966085.385829][11867:11869] 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" 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 17970de7312fdb..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,7 +31,7 @@ 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: @@ -39,7 +39,7 @@ tests: constraints: type: int16u - - label: "Step 3: Read the global attribute: FeatureMap" + - label: "Step 3: TH reads from the DUT the FeatureMap attribute." command: "readAttribute" attribute: "FeatureMap" response: @@ -47,7 +47,7 @@ tests: constraints: type: bitmap32 - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4: TH reads from the DUT the AttributeList attribute." PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" @@ -56,7 +56,7 @@ tests: type: list contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - - label: "Step 4a: Read the global attribute: AttributeList" + - label: "Step 4: TH reads from the DUT the AttributeList attribute." PICS: "!PICS_EVENT_LIST_ENABLED" command: "readAttribute" attribute: "AttributeList" @@ -65,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: 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 - 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 && PICS_EVENT_LIST_ENABLED - 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 - 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 - 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_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_3_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_3_1.yaml index 80c25bb1d0cfe2..3359307064a0fb 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 @@ -165,80 +165,76 @@ tests: # 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 + 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 3a: 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 3a: 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 3a: 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 3a: 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 3a: 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" cluster: "DelayCommands" 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..7c710cf5be394f 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 @@ -165,82 +165,76 @@ tests: # 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 + 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 3a: 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 3a: 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 3a: 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 3a: 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 3a: 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" cluster: "DelayCommands" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 6025a953f089ca..e280baad7d579f 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -307,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 @@ -329,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 @@ -580,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 @@ -603,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 @@ -652,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 @@ -763,7 +785,11 @@ 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 @@ -1446,7 +1472,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 @@ -1862,12 +1888,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 @@ -2006,6 +2026,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 @@ -2039,7 +2060,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 @@ -2098,7 +2119,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 @@ -2196,7 +2216,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 @@ -2220,7 +2240,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 @@ -2404,27 +2423,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 @@ -2480,7 +2478,11 @@ 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 @@ -2546,7 +2548,11 @@ RVCRUNM.S.A0003=1 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) @@ -2563,6 +2569,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 @@ -2592,6 +2603,9 @@ FAN.S.C00.Rsp=1 #ICD Management +#Server +ICDM.S=1 + #Server Attribute ICDM.S.A0000=1 ICDM.S.A0001=1 @@ -2665,14 +2679,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 @@ -2680,6 +2692,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 @@ -2715,4 +2728,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..90615d2a82ef29 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", @@ -66,15 +63,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 +98,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 +107,7 @@ "Test_TC_ULABEL_2_3", "Test_TC_ULABEL_2_4" ], + "LaundryWasherMode": ["Test_TC_LWM_1_1", "Test_TC_LWM_2_1"], "MediaControl": [ "Test_TC_LOWPOWER_1_1", "Test_TC_KEYPADINPUT_1_2", @@ -161,7 +158,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,9 +173,11 @@ "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", + "Test_TC_RVCCLEANM_3_1", "Test_TC_RVCRUNM_1_1", "Test_TC_RVCOPSTATE_1_1" ], @@ -193,6 +192,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 +278,8 @@ "TestTimeSynchronization", "TestOperationalState", "TestRVCOperationalState", - "TestDishwasherAlarm" + "TestDishwasherAlarm", + "Test_AddNewFabricFromExistingFabric" ], "MultiAdmin": ["TestMultiAdmin"], "SoftwareDiagnostics": ["Test_TC_DGSW_1_1"], @@ -304,7 +306,6 @@ "Test_TC_G_2_1" ], "Scenes": ["Test_TC_S_1_1"], - "RVCOperationalState": ["Test_TC_RVCOPSTATE_1_1"], "ResourceMonitoring": [ "TestActivatedCarbonFilterMonitoring", "TestHepaFilterMonitoring", @@ -363,6 +364,7 @@ "LocalizationConfiguration", "UnitLocalization", "TimeFormatLocalization", + "LaundryWasherMode", "MediaControl", "ModeSelect", "MultipleFabrics", @@ -374,11 +376,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 df76b9d101193d..a2f917ac68c226 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": [ @@ -116,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": [], @@ -192,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", @@ -267,35 +257,23 @@ "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" + "Test_TC_OPSTATE_2_3" ], "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_3_1", - "Test_TC_RVCCLEANM_3_3" - ], + "RVCCleanMode": ["Test_TC_RVCCLEANM_3_3"], "RVCOperationalState": ["Test_TC_RVCOPSTATE_2_2"], "RVCRunMode": [ "Test_TC_RVCRUNM_1_1", @@ -303,7 +281,6 @@ "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", @@ -312,7 +289,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", @@ -324,7 +300,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"], 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-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/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..38b30a0fa68e2b 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,6 +188,8 @@ limitations under the License. Matter On/Off Light 0x0103 0x0100 + Simple + Endpoint IDENTIFY_TIME @@ -259,6 +273,9 @@ limitations under the License. Matter Dimmable Light 0x0103 0x0101 + Simple + Endpoint + Matter On/Off Light IDENTIFY_TIME @@ -345,6 +362,9 @@ limitations under the License. Matter Color Temperature Light 0x0103 0x010C + Simple + Endpoint + Matter Dimmable Light IDENTIFY_TIME @@ -477,6 +497,9 @@ limitations under the License. Matter Extended Color Light 0x0103 0x010D + Simple + Endpoint + Matter Color Temperature Light IDENTIFY_TIME @@ -619,6 +642,8 @@ limitations under the License. Matter On/Off Plug-in Unit 0x0103 0x010A + Simple + Endpoint IDENTIFY_TIME @@ -701,6 +726,8 @@ limitations under the License. Matter Dimmable Plug-in Unit 0x0103 0x010B + Simple + Endpoint IDENTIFY_TIME @@ -783,6 +810,8 @@ limitations under the License. Matter Pump 0x0999 0x0303 + Simple + Endpoint IDENTIFY_TIME @@ -861,6 +890,8 @@ limitations under the License. Matter On/Off Light Switch 0x0103 0x0103 + Simple + Endpoint IDENTIFY_TIME @@ -920,6 +951,9 @@ limitations under the License. Matter Dimmer Switch 0x0103 0x0104 + Simple + Endpoint + Matter On/Off Light Switch IDENTIFY_TIME @@ -980,6 +1014,9 @@ limitations under the License. Matter Color Dimmer Switch 0x0103 0x0105 + Simple + Endpoint + Matter Dimmer Switch IDENTIFY_TIME @@ -1041,6 +1078,8 @@ limitations under the License. Matter Control Bridge 0x0103 0x0840 + Simple + Endpoint IDENTIFY_TIME @@ -1075,6 +1114,8 @@ limitations under the License. Matter Pump Controller 0x0999 0x0304 + Simple + Endpoint IDENTIFY_TIME @@ -1141,6 +1182,8 @@ limitations under the License. Matter Generic Switch 0x0103 0x000f + Simple + Endpoint IDENTIFY_TIME @@ -1166,6 +1209,8 @@ limitations under the License. Matter Contact Sensor 0x0103 0x0015 + Simple + Endpoint IDENTIFY_TIME @@ -1191,6 +1236,8 @@ limitations under the License. Matter Light Sensor 0x0103 0x0106 + Simple + Endpoint IDENTIFY_TIME @@ -1222,6 +1269,8 @@ limitations under the License. Matter Occupancy Sensor 0x0103 0x0107 + Simple + Endpoint IDENTIFY_TIME @@ -1252,6 +1301,8 @@ limitations under the License. Matter Temperature Sensor 0x0103 0x0302 + Simple + Endpoint IDENTIFY_TIME @@ -1275,6 +1326,8 @@ limitations under the License. Matter Pressure Sensor 0x0103 0x0305 + Simple + Endpoint IDENTIFY_TIME @@ -1298,6 +1351,8 @@ limitations under the License. Matter Flow Sensor 0x0103 0x0306 + Simple + Endpoint IDENTIFY_TIME @@ -1321,6 +1376,8 @@ limitations under the License. Matter Humidity Sensor 0x0103 0x0307 + Simple + Endpoint IDENTIFY_TIME @@ -1344,6 +1401,8 @@ limitations under the License. Matter On/Off Sensor 0x0103 0x0850 + Simple + Endpoint IDENTIFY_TIME @@ -1374,6 +1433,8 @@ limitations under the License. Matter Door Lock 0x0103 0x000A + Simple + Endpoint IDENTIFY_TIME @@ -1401,6 +1462,8 @@ limitations under the License. Matter Door Lock Controller 0x0103 0x000B + Simple + Endpoint DEVICE_TYPE_LIST @@ -1421,6 +1484,8 @@ limitations under the License. Matter Window Covering 0x0103 0x0202 + Simple + Endpoint IDENTIFY_TIME @@ -1477,6 +1542,8 @@ limitations under the License. Matter Window Covering Controller 0x0103 0x0203 + Simple + Endpoint IDENTIFY_TIME @@ -1505,6 +1572,8 @@ limitations under the License. Matter Heating/Cooling Unit 0x0103 0x0300 + Simple + Endpoint IDENTIFY_TIME @@ -1567,6 +1636,8 @@ limitations under the License. Matter Thermostat 0x0103 0x0301 + Simple + Endpoint IDENTIFY_TIME @@ -1632,6 +1703,8 @@ limitations under the License. Matter Fan 0x0103 0x002B + Simple + Endpoint IDENTIFY_TIME @@ -1667,6 +1740,8 @@ limitations under the License. Matter Casting Video Player 0x0103 0x0023 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1694,6 +1769,8 @@ limitations under the License. Matter Basic Video Player 0x0103 0x0028 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1718,6 +1795,8 @@ limitations under the License. Matter Casting Video Client 0x0103 0x0029 + Simple + Endpoint DEVICE_TYPE_LIST @@ -1750,6 +1829,8 @@ limitations under the License. Matter Video Remote Control 0x0103 0x002A + Simple + Endpoint DEVICE_TYPE_LIST @@ -1781,6 +1862,8 @@ limitations under the License. Matter Speaker 0x0103 0x0022 + Simple + Endpoint IDENTIFY_TIME @@ -1805,6 +1888,8 @@ limitations under the License. Matter Content App 0x0103 0x0024 + Simple + Endpoint IDENTIFY_TIME @@ -1835,6 +1920,8 @@ limitations under the License. Matter Mode Select 0x0103 0x0027 + Simple + Endpoint IDENTIFY_TIME @@ -1858,6 +1945,8 @@ limitations under the License. Matter Room Air Conditioner 0x0103 0x0072 + Simple + Endpoint IDENTIFY_TIME @@ -1885,6 +1974,8 @@ limitations under the License. Matter Smoke CO Alarm 0x0103 0x0076 + Simple + Endpoint IDENTIFY_TIME @@ -1905,6 +1996,8 @@ limitations under the License. Matter Air Purifier 0x0103 0x002D + Simple + Endpoint @@ -1924,6 +2017,8 @@ limitations under the License. Matter Air Quality Sensor 0x0103 0x002C + Simple + Endpoint @@ -1952,6 +2047,8 @@ limitations under the License. Matter Dishwasher 0x0103 0x0075 + Simple + Endpoint @@ -1968,6 +2065,8 @@ limitations under the License. Matter Refrigerator 0x0103 0x0070 + Simple + Endpoint @@ -1981,6 +2080,8 @@ limitations under the License. Matter Laundry Washer 0x0103 0x0073 + Simple + Endpoint @@ -1997,6 +2098,8 @@ limitations under the License. Matter Robotic Vacuum Cleaner 0x0103 0x0074 + Simple + Endpoint @@ -2012,6 +2115,8 @@ limitations under the License. Matter Temperature Controlled Cabinet 0x0103 0x0071 + Simple + Endpoint 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/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_cluster_list.json b/src/app/zap_cluster_list.json index 1212b7b28ab8ff..44109ba4634ab1 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -115,7 +115,7 @@ "ServerDirectories": { "ACCESS_CONTROL_CLUSTER": ["access-control-server"], "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"], - "ACTIONS_CLUSTER": [], + "ACTIONS_CLUSTER": ["air-quality-server"], "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER": [ "resource-monitoring-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 e37b058f7a67e4..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; } 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..cea8a51bb4d640 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; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index bc52b5ffeb934d..77c4ee67eca5a6 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -33,7 +33,33 @@ ], "endpointTypes": [ { + "id": 1, "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -8445,7 +8471,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -8791,7 +8817,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18109,7 +18135,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -19047,7 +19073,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -28760,9 +28786,7 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 + "networkId": 0 } ], "log": [] 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/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/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/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 55a325fa8d3432..22ae11cda65a78 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -1019,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) 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..1ee10b3c5bdb19 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: @@ -18088,7 +18095,7 @@ class AlarmMap(IntFlag): 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 +18111,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 +18130,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 +18146,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 +18162,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 +18178,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 +18194,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 +18210,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 +18226,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 +18242,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 +18258,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 +18274,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 +18291,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 +18315,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 +18403,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 +18416,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 +18429,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 +18442,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 +18455,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 +18474,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 +18490,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 +18506,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 +18522,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 +18538,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 +18554,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 +18570,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 +18586,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 +18602,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 +18618,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 +18634,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 +18650,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 +18667,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 +18686,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 +18708,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 +18799,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 +18812,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 +18825,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 +18838,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 +18851,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 +18870,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 +18886,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 +18902,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 +18918,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 +18934,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 +18950,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 +18966,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 +18982,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 +18998,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 +19014,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 +19030,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 +19046,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 +19063,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 +19082,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 +19104,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: @@ -19185,7 +19192,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 +19208,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 +19224,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 +19240,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 +19256,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 +19272,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 +19288,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 +19304,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 +19320,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 +19336,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 +19352,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 +19368,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 +19384,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 +19399,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: @@ -19480,7 +19487,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 +19503,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 +19519,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 +19535,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 +19551,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 +19567,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 +19583,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 +19599,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 +19615,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 +19631,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 +19647,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 +19663,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 +19679,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 +19694,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 +20206,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 +20226,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 +20246,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 +20268,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 +20296,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 +20314,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 +20344,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 +20362,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 +20384,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 +20402,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 +20426,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 +20444,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 +20466,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 +20482,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 +20506,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 +20522,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 +20554,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 +20570,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 +20604,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 +20624,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 +20654,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 +20674,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 +20690,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 +20714,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 +20734,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 +20757,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 +20773,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 +20789,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 +20805,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 +20821,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 +20837,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 +20853,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 +20869,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 +20885,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 +20901,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 +20917,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 +20933,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 +20949,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 +20965,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 +20981,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 +20997,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 +21013,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 +21029,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 +21045,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 +21061,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 +21077,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 +21093,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 +21109,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 +21125,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 +21141,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 +21157,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 +21173,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 +21189,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 +21205,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 +21221,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 +21237,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 +21253,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 +21269,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 +21285,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 +21301,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 +21317,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 +21333,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 +21349,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 +21365,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 +21381,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 +21397,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 +21413,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 +21430,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 +21449,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 +21468,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 +21497,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 +21528,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 +21558,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 +21719,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 +21732,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 +21745,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 +21758,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 +21774,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 +21790,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 +21806,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 +21825,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 +21841,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 +21857,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 +21873,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 +21889,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 +21905,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 +21921,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 +21937,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 +21953,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 +21969,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 +21985,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 +22001,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 +22017,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 +22033,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 +22049,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 +22065,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 +22081,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 +22097,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 +22113,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 +22129,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 +22145,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 +22161,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 +22177,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 +22193,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 +22209,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 +22225,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 +22241,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 +22257,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 +22272,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 +22316,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 +22332,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 +22348,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 +22364,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 +22380,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 +22396,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 +22412,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 +22428,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 +22444,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 +22460,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 +22476,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 +22492,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 +22508,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 +22524,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 +22540,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 +22556,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 +22572,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 +22588,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 +22603,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 +22721,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 +22737,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 +22753,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 +22769,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 +22785,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 +22801,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 +22817,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 +22833,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 +22849,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 +22865,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 +22881,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 +22897,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 +22913,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 +22929,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 +22945,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 +22961,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 +22977,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 +22993,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 +23009,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 +23025,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 +23041,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 +23057,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 +23073,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 +23089,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 +23105,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 +23121,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 +23137,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 +23153,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 +23169,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 +23186,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 +23202,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 +23218,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 +23234,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 +23250,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 +23266,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 +23282,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 +23298,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 +23314,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 +23330,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 +23346,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 +23362,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 +23378,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 +23394,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 +23410,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 +23426,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 +23442,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 +23457,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 +23669,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 +23687,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 +23709,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 +23731,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 +23749,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 +23765,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 +23781,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 +23797,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 +23813,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 +23829,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 +23845,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 +23861,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 +23877,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 +23893,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 +23909,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 +23925,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 +23941,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 +23957,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 +23973,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 +23989,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 +24005,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 +24021,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 +24037,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 +24053,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 +24069,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 +24085,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 +24101,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 +24117,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 +24133,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 +24149,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 +24165,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 +24181,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 +24197,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 +24213,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 +24229,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 +24245,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 +24261,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 +24277,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 +24293,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 +24309,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 +24325,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 +24341,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 +24357,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 +24373,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 +24389,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 +24405,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 +24421,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 +24437,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 +24453,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 +24469,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 +24485,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 +24501,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 +24517,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 +24533,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 +24549,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 +24565,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 +24581,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 +24597,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 +24613,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 +24629,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 +24644,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 +24756,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 +24779,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 +24795,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 +24811,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 +24827,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 +24843,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 +24859,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 +24875,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 +24891,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 +24907,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 +24923,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 +24939,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 +24955,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 +24971,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 +24987,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 +25003,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 +25019,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 +25035,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 +25051,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 +25066,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 +25098,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 +25114,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 +25130,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 +25146,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 +25162,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 +25178,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 +25194,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 +25210,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 +25226,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 +25241,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 +25469,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 +25493,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 +25515,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 +25539,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 +25561,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 +25583,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 +25607,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 +25631,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 +25655,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 +25677,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 +25701,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 +25723,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 +25747,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 +25769,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 +25793,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 +25817,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 +25845,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 +25863,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 +25889,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 +25920,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 +25936,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 +25952,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 +25968,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 +25984,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 +26000,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 +26016,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 +26032,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 +26048,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 +26064,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 +26080,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 +26096,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 +26112,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 +26128,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 +26144,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 +26160,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 +26176,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 +26192,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 +26208,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 +26224,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 +26240,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 +26256,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 +26272,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 +26288,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 +26304,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 +26320,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 +26336,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 +26352,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 +26368,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 +26384,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 +26400,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 +26416,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 +26432,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 +26448,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 +26464,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 +26480,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 +26496,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 +26512,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 +26528,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 +26544,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 +26560,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 +26576,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 +26592,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 +26608,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 +26624,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 +26640,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 +26656,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 +26672,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 +26688,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 +26704,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 +26720,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 +26736,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 +26752,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 +26768,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 +26784,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 +26800,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 +26816,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 +26832,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 +26847,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 +26901,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 +26917,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 +26933,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 +26949,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 +26965,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 +26981,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 +26997,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 +27013,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 +27029,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 +27045,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 +27061,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 +27077,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 +27093,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 +27109,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 +27125,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 +27141,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 +27157,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 +27173,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 +27189,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 +27205,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 +27220,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 +27266,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 +27282,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 +27298,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 +27314,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 +27330,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 +27346,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 +27362,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 +27378,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 +27394,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 +27410,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 +27426,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 +27441,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 +27475,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 +27491,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 +27507,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 +27523,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 +27539,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 +27555,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 +27571,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 +27587,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 +27603,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 +27619,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 +27634,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 +27682,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 +27698,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 +27714,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 +27730,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 +27746,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 +27762,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 +27778,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 +27794,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 +27810,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 +27826,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 +27842,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 +27858,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 +27874,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 +27890,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 +27906,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 +27921,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 +27955,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 +27971,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 +27987,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 +28003,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 +28019,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 +28035,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 +28051,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 +28067,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 +28083,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 +28099,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 +28114,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 +28148,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 +28164,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 +28180,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 +28196,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 +28212,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 +28228,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 +28244,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 +28260,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 +28276,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 +28292,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 +28307,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 +28378,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 +28394,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 +28410,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 +28426,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 +28442,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 +28458,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 +28474,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 +28490,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 +28506,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 +28522,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 +28538,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 +28554,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 +28570,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 +28586,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 +28602,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 +28618,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 +28634,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 +28650,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 +28665,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 +28760,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 +28776,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 +28792,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 +28808,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 +28824,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 +28840,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 +28856,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 +28872,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 +28888,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 +28904,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 +28920,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 +28936,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 +28952,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 +28968,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 +28984,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 +29000,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 +29016,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 +29031,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 +29126,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 +29142,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 +29158,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 +29174,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 +29190,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 +29206,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 +29222,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 +29238,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 +29254,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 +29270,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 +29286,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 +29302,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 +29318,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 +29334,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 +29350,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 +29366,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 +29382,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 +29397,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 +29492,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 +29508,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 +29524,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 +29540,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 +29556,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 +29572,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 +29588,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 +29604,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 +29620,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 +29636,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 +29652,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 +29668,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 +29684,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 +29700,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 +29716,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 +29732,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 +29748,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 +29763,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 +29858,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 +29874,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 +29890,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 +29906,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 +29922,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 +29938,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 +29954,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 +29970,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 +29986,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 +30002,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 +30018,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 +30034,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 +30050,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 +30066,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 +30082,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 +30098,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 +30114,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 +30129,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 +30224,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 +30240,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 +30256,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 +30272,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 +30288,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 +30304,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 +30320,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 +30336,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 +30352,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 +30368,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 +30384,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 +30400,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 +30416,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 +30432,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 +30448,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 +30464,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 +30480,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 +30495,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 +30590,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 +30606,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 +30622,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 +30638,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 +30654,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 +30670,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 +30686,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 +30702,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 +30718,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 +30734,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 +30750,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 +30766,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 +30782,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 +30798,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 +30814,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 +30830,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 +30846,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 +30861,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 +30956,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 +30972,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 +30988,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 +31004,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 +31020,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 +31036,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 +31052,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 +31068,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 +31084,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 +31100,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 +31116,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 +31132,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 +31148,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 +31164,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 +31180,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 +31196,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 +31212,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 +31227,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 +31322,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 +31338,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 +31354,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 +31370,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 +31386,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 +31402,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 +31418,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 +31434,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 +31450,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 +31466,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 +31482,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 +31498,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 +31514,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 +31530,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 +31546,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 +31562,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 +31578,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 +31593,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 +31688,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 +31704,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 +31720,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 +31736,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 +31752,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 +31768,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 +31784,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 +31800,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 +31816,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 +31832,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 +31848,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 +31864,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 +31880,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 +31896,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 +31912,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 +31928,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 +31944,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 +31959,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 +32054,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 +32070,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 +32086,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 +32102,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 +32118,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 +32134,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 +32150,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 +32166,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 +32182,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 +32198,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 +32214,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 +32230,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 +32246,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 +32262,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 +32278,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 +32294,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 +32310,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 +32325,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 +32353,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 +32369,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 +32385,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 +32401,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 +32417,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 +32433,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 +32449,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 +32464,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 +32555,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 +32571,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 +32589,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 +32607,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 +32626,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 +32642,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 +32658,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 +32674,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 +32690,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 +32706,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 +32722,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 +32738,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 +32754,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 +32769,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 +32822,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 +32840,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 +32861,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 +32877,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 +32893,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 +32909,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 +32925,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 +32941,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 +32957,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 +32973,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 +32988,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 +33070,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 +33083,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 +33096,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 +33109,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 +33122,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 +33135,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 +33148,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 +33161,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 +33174,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 +33190,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 +33206,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 +33224,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 +33243,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 +33259,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 +33275,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 +33291,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 +33307,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 +33323,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 +33339,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 +33355,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 +33371,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 +33387,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 +33403,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 +33419,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 +33435,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 +33450,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 +33520,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 +33536,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 +33549,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 +33562,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 +33583,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 +33599,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 +33615,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 +33631,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 +33647,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 +33663,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 +33679,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 +33695,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 +33710,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 +33734,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 +33750,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 +33766,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 +33782,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 +33798,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 +33814,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 +33830,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 +33845,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 +33979,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 +33995,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 +34014,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 +34030,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 +34046,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 +34062,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 +34078,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 +34094,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 +34109,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 +34278,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 +34298,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 +34318,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 +34339,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 +34355,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 +34371,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 +34387,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 +34403,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 +34419,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 +34435,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 +34451,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 +34466,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 +34528,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 +34544,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 +34565,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 +34581,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 +34597,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 +34613,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 +34629,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 +34645,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 +34661,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 +34677,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 +34692,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 +34762,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 +34780,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 +34796,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 +34812,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 +34833,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 +34849,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 +34865,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 +34881,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 +34897,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 +34913,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 +34929,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 +34945,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 +34960,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 +35028,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 +35044,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 +35060,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 +35076,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 +35092,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 +35108,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 +35124,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 +35140,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 +35156,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 +35172,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 +35188,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 +35204,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 +35220,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 +35236,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 +35251,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 +35275,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 +35295,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 +35311,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 +35333,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 +35353,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 +35369,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 +35385,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 +35401,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 +35417,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 +35433,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 +35448,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 +35728,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 +35750,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 +35763,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 +35789,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 +35812,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 +35828,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 +35844,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 +35860,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 +35876,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 +35892,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 +35908,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 +35924,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 +35940,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 +35956,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 +35972,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 +35988,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 +36004,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 +36020,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 +36036,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 +36052,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 +36068,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 +36084,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 +36100,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 +36116,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 +36132,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 +36148,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 +36164,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 +36180,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 +36196,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 +36212,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 +36228,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 +36244,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 +36260,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 +36276,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 +36292,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 +36308,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 +36324,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 +36340,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 +36356,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 +36372,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 +36388,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 +36404,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 +36420,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 +36436,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 +36452,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 +36468,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 +36484,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 +36500,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 +36516,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 +36532,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 +36548,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 +36564,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 +36580,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 +36596,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 +36612,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 +36628,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 +36644,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 +36660,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 +36676,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 +36692,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 +36708,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 +36724,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 +36740,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 +36756,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 +36772,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 +36788,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 +36804,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 +36820,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 +36836,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 +36852,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 +36868,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 +36884,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 +36900,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 +36916,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 +36932,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 +36948,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 +36964,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 +36980,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 +36996,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 +37012,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 +37028,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 +37044,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 +37060,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 +37076,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 +37092,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 +37108,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 +37124,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 +37140,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 +37156,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 +37172,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 +37188,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 +37204,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 +37220,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 +37236,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 +37252,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 +37268,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 +37284,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 +37300,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 +37316,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 +37332,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 +37348,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 +37364,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 +37380,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 +37396,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 +37412,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 +37428,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 +37444,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 +37460,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 +37476,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 +37492,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 +37508,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 +37524,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 +37540,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 +37556,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 +37572,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 +37588,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 +37604,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 +37620,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 +37636,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 +37652,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 +37668,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 +37684,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 +37700,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 +37716,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 +37732,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 +37748,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 +37764,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 +37780,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 +37796,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 +37812,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 +37828,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 +37844,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 +37860,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 +37876,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 +37892,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 +37908,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 +37924,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 +37940,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..be19881c342c43 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; @@ -639,6 +644,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 +755,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/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/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/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 21ec9e56f737e9..4b2c32d9c2bf0d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -335,7 +335,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]) { diff --git a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm index d64522f4ceded7..4ebef0535253ee 100644 --- a/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTROTAProviderDelegateBridge.mm @@ -108,7 +108,6 @@ CHIP_ERROR Shutdown() mExchangeMgr = nullptr; mSystemLayer = nullptr; - mDelegateNotificationQueue = nil; return CHIP_NO_ERROR; } diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 55e262b09189af..b838c64d8d0d15 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7648,6 +7648,11 @@ Descriptor: Feature: - TagList + Scenes: + Feature: + - Explicit + - TableSize + - FabricScenes removed: clusters: # Clusters that really should just not be exposed, even if they're in our XML. diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 05d64c0e3f2d04..f8b8aebc1350fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -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_NEWLY_AVAILABLE = 0x2, + MTRScenesFeatureTableSize MTR_NEWLY_AVAILABLE = 0x4, + MTRScenesFeatureFabricScenes MTR_NEWLY_AVAILABLE = 0x8, } API_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { @@ -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 MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; + 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, 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/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/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..589d138ba77773 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); @@ -453,11 +452,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/inet/UDPEndPointImplLwIP.cpp b/src/inet/UDPEndPointImplLwIP.cpp index 7ec594127b0f14..8690fb3839377c 100644 --- a/src/inet/UDPEndPointImplLwIP.cpp +++ b/src/inet/UDPEndPointImplLwIP.cpp @@ -41,6 +41,11 @@ 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 || \ + CHIP_DEVICE_LAYER_TARGET_ASR) +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 +67,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 +108,6 @@ CHIP_ERROR UDPEndPointImplLwIP::BindImpl(IPAddressType addressType, const IPAddr res = LwIPBindInterface(mUDP, interfaceId); } - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); - return res; } @@ -101,7 +116,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 +125,6 @@ CHIP_ERROR UDPEndPointImplLwIP::BindInterfaceImpl(IPAddressType addrType, Interf { err = LwIPBindInterface(mUDP, intfId); } - - UNLOCK_TCPIP_CORE(); - return err; } @@ -134,6 +146,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 +162,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 +183,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 +241,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 +267,6 @@ void UDPEndPointImplLwIP::CloseImpl() } } } - - // Unlock LwIP stack - UNLOCK_TCPIP_CORE(); } void UDPEndPointImplLwIP::Free() @@ -473,19 +477,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 +512,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/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/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..54d7fb84188d01 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 UINT8_MAX, + * the tag is encoded using ContextTag. When tagNumber is less than 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..c4a7addb27f0fe 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 @@ -130,7 +134,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) @@ -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..bb8fe2d993da32 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -156,7 +156,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 +178,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp SetResponseExpected(false); return err; } - startedResponseTimer = true; + currentMessageExpectResponse = true; } } @@ -222,9 +222,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 +243,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) { 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/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..d0706b47ec91cd 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -390,6 +390,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 +434,7 @@ if (chip_device_platform != "none") { "LockTracker.cpp", "PersistedStorage.cpp", "PlatformEventSupport.cpp", + "RuntimeOptionsProvider.cpp", ] # Linux has its own NetworkCommissioningThreadDriver @@ -450,6 +452,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", ] 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/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/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/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp old mode 100755 new mode 100644 index dfaee5297f6f11..f8cdcb2f453e44 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -614,11 +614,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 +665,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 +679,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 +706,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..b91d210f7c5028 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.h +++ b/src/platform/Linux/ThreadStackManagerImpl.h @@ -118,8 +118,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..b28058b5946d72 100755 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.h @@ -120,7 +120,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); diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index da821aefc6c0e7..4d2f461e61dd7f 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -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) { 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/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/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index 1afc796cf97dce..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" }; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index 899dc0f5b6f9ae..507a2b62e87da8 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -81,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 535698a312f3a0..8eecf20180c546 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -185,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 51b04eb3e8812a..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. 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..d9dd83c923cd57 100644 --- a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp +++ b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp @@ -44,10 +44,10 @@ 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_WiFiSSID, mSavedNetwork.credentials, sizeof(mSavedNetwork.credentials), &credentialsLen); SuccessOrExit(err); - err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kBLConfigKey_wifipassword, mSavedNetwork.ssid, + err = PersistedStorage::KeyValueStoreMgr().Get(BLConfig::kConfigKey_WiFiPassword, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), &ssidLen); SuccessOrExit(err); @@ -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; diff --git a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.h index edf2d3f04d90a4..7e0fd1b30727a1 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; @@ -134,7 +134,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..6087fce9d94f66 --- /dev/null +++ b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp @@ -0,0 +1,370 @@ +/* + * 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"); + wifiInterface_connect((char *) ssid, (char *) key); + 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..48bf7d098c869f --- /dev/null +++ b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.h @@ -0,0 +1,133 @@ +/* + * 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; + }; + + // 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/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/common/BLConfig.h b/src/platform/bouffalolab/common/BLConfig.h index 5c11160b3b0dd6..4dfc3dc9a1f6a4 100644 --- a/src/platform/bouffalolab/common/BLConfig.h +++ b/src/platform/bouffalolab/common/BLConfig.h @@ -67,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/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/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/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..32518820d64045 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) @@ -206,7 +210,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 +243,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/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..000597e5231d90 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -20,11 +20,24 @@ #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 "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 +53,20 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { mButtonCallback = nullptr; - RSI_Wakeupsw_config(); + sl_system_init(); + + // 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/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/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/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..dd9446ddda98ee 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -17,11 +17,13 @@ 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 @@ -97,6 +99,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 +168,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 +450,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 +486,15 @@ 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: - 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 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 presence of claimed attributes if success: @@ -425,8 +583,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 +750,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_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_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_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/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..bdc52cce1afd62 --- /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.A0033.Write"): + 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.A0033.Write"): + 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.A0033.Write"): + 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.A0033.Write"): + 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.A0030.Write"): + 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.A0031.Write"): + 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.A0023.Write"): + 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/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..829371df7cc620 --- /dev/null +++ b/src/test_driver/tizen/chip_tests/BUILD.gn @@ -0,0 +1,49 @@ +# 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") ] +} + +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/app/tests/suites/commands/commissioner/BUILD.gn b/src/tracing/esp32_trace/BUILD.gn similarity index 65% rename from src/app/tests/suites/commands/commissioner/BUILD.gn rename to src/tracing/esp32_trace/BUILD.gn index 3f4c174a70fef5..d7580a3e68ac2a 100644 --- a/src/app/tests/suites/commands/commissioner/BUILD.gn +++ b/src/tracing/esp32_trace/BUILD.gn @@ -1,4 +1,5 @@ -# 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. @@ -15,18 +16,12 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -static_library("commissioner") { - output_name = "libCommissionerCommands" - - sources = [ - "CommissionerCommands.cpp", - "CommissionerCommands.h", - ] - - cflags = [ "-Wconversion" ] +config("tracing") { + include_dirs = [ "include" ] +} - public_deps = [ - "${chip_root}/src/controller", - "${chip_root}/src/lib/support", - ] +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/imgui/repo b/third_party/imgui/repo index 226923fa7e9d73..f617fe7890f78b 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 226923fa7e9d73e28958a04884943318797d9991 +Subproject commit f617fe7890f78bc300e7a068a1c2acc9e9ce1e97 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index f97832a5ecb422..c10520f45f6780 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit f97832a5ecb422b9fe75d39bc168962d763648e8 +Subproject commit c10520f45f67807d438e8436d5dbe94aa10352b2 diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index 09a356071fb9c2..d9ecc77395f09c 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit 09a356071fb9c2a31671ad1cf982dc52d5fae1d2 +Subproject commit d9ecc77395f09cd8cafd8b63cb82a27e6b02c04a 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..d4155e4e5f2a74 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit e958f8827ede37d543e962513d332d00dab6b1c3 +Subproject commit d4155e4e5f2a74cc50a545aa3dfb78f558dc117b diff --git a/third_party/ot-br-posix/repo b/third_party/ot-br-posix/repo index b0bbad3ed28e60..8299da302aebf8 160000 --- a/third_party/ot-br-posix/repo +++ b/third_party/ot-br-posix/repo @@ -1 +1 @@ -Subproject commit b0bbad3ed28e60bef7cd206c15a9a46e0528f919 +Subproject commit 8299da302aebf807e76885e9f758df18100522d1 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..9b973b083521e9 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,68 @@ 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", "${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 +121,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 +134,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 +235,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 +278,91 @@ 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/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 +401,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..2295bd5e14f9fd 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 += [ @@ -532,7 +543,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 +552,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 +580,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 +591,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 +624,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 +663,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 +673,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 +690,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 +760,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 +819,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 +860,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 +872,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..a7f35beb8e8601 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit f76916640f577ce81db2ec361d560c77c2e21478 +Subproject commit a7f35beb8e8601b1686e4aa90f90060571bb9dc2 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..0a9db52aa98a2f --- /dev/null +++ b/third_party/silabs/wifi_sdk @@ -0,0 +1 @@ +Subproject commit 0a9db52aa98a2f9c56ef1160281f9daf5d50079f 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 2fbf4228ee276d..e04f70725036c9 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -279,6 +279,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 += [ @@ -287,6 +288,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..3c8704a8491a13 100644 --- a/third_party/tizen/tizen_sdk.gni +++ b/third_party/tizen/tizen_sdk.gni @@ -198,6 +198,9 @@ template("tizen_qemu_mkisofs") { 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/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index df0f618f25c559..3c6c262fcdec57 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 @@ -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) @@ -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 { 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..244a3ad9023876 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 @@ -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); @@ -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); 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..590330cb5f5bb2 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 { 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 e4db248841446d..00000000000000 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ /dev/null @@ -1,143815 +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_DA_1_8\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_3_1\n"); - printf("Test_TC_RVCCLEANM_3_3\n"); - printf("Test_TC_RVCOPSTATE_2_2\n"); - printf("Test_TC_RVCRUNM_1_1\n"); - printf("Test_TC_RVCRUNM_3_1\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"); - 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"); - 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"), 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"), 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"), 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"), 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"), 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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", 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_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)); - shouldContinue = true; - 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; - 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")); - } - 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("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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"); - 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 4a: 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 4a: 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 4b: TH reads from the DUT the AttributeList attribute. 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 10: { - LogStep(10, "Step 5a: 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 11: { - LogStep(11, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 13: { - LogStep( - 13, - "Step 6b: TH reads from the DUT the AcceptedCommandList attribute. 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 14: { - LogStep(14, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AirQuality::Id, AirQuality::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 15: { - LogStep( - 15, - "Step 7b: TH reads from the DUT the GeneratedCommandList attribute. 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); - } - } - 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("BOOL.S.E00 && PICS_EVENT_LIST_ENABLED"), 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(" !BOOL.S.E00 && PICS_EVENT_LIST_ENABLED "), 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", 28, 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, 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, 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 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))); - 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(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, 7UL)); - } - 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, 13UL)); - } - 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, 14UL)); - } - 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, 15UL)); - } - 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)); - } - 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::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - 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, 2UL)); - } - 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::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 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::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 27: - 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("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"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::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(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "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 6: { - LogStep(6, "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 7: { - LogStep(7, "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 8: { - LogStep(8, "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 9: { - LogStep(9, "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 10: { - LogStep(10, "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 11: { - LogStep(11, "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 12: { - LogStep(12, "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 13: { - LogStep(13, "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 14: { - LogStep(14, "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 15: { - LogStep(15, "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 16: { - LogStep(16, "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 17: { - LogStep(17, "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 18: { - LogStep(18, "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 19: { - LogStep(19, - "Step 4p: 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 20: { - LogStep(20, "Step 5a: TH reads optional event(StartUp) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E00 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Step 5b: TH reads optional attribute(ShutDown) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E01 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "Step 5c: TH reads optional attribute(Leave) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E02 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "Step 5d: 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 && PICS_EVENT_LIST_ENABLED"), 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 24: { - LogStep(24, "Step 6a: TH1 reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, - "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 26: { - LogStep(26, "Step 7a: TH1 reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 27: { - LogStep(27, - "Step 7b: TH1 reads GeneratedCommandList 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_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 && PICS_EVENT_LIST_ENABLED"), 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"); - 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"); - 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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_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, "Step 2a: 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 2b: 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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonDioxideConcentrationMeasurement::Id, - CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), CarbonMonoxideConcentrationMeasurement::Id, - CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 7b: TH1 reads GeneratedCommandList 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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FormaldehydeConcentrationMeasurement::Id, - FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4i: 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 4j: 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 4k: 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "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"), 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 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), NitrogenDioxideConcentrationMeasurement::Id, - NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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"), 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 5a: 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 29: { - LogStep(29, - "Step 5b: Read the global attribute: EventList. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OzoneConcentrationMeasurement::Id, - OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm1ConcentrationMeasurement::Id, - Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7b: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm25ConcentrationMeasurement::Id, - Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, - "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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Pm10ConcentrationMeasurement::Id, - Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, - "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_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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 4l: TH reads the AttributeList attribute from the 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 28: { - LogStep(28, "Step 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 31: { - LogStep(31, - "Step 6b: Read the global attribute AcceptedCommandList. 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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RadonConcentrationMeasurement::Id, - RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 7b: Read the global attribute: GeneratedCommandList. 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); - } - } - 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", 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_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)); - shouldContinue = true; - 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("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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::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 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::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 33: - 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), 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 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"), 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 5a: 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 29: { - LogStep(29, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, - "Step 6b: Read the global attribute: AcceptedCommandList. 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 32: { - LogStep(32, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, - TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, - "Step 7b: Read the global attribute: GeneratedCommandList. 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); - } - } - 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"); - 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"); - 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"); - 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"), 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"); - 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"), 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"); - 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"); - 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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(" !BINFO.S.E00 && !BINFO.S.E01 && !BINFO.S.E02 && !BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED"), - 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("BINFO.S.E00 && PICS_EVENT_LIST_ENABLED"), 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("BINFO.S.E01 && PICS_EVENT_LIST_ENABLED"), 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("BINFO.S.E02 && PICS_EVENT_LIST_ENABLED"), 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("BINFO.S.A0011 && PICS_EVENT_LIST_ENABLED"), 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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"); - 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 "), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 )"), 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"), 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"), 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"), 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"), 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 )"), 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"), 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"), 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)); - 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, 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"); - 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: 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"); - 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"); - 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"); - 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"), 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"); - 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"), 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"); - 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 )"), 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.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"), 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"), 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"); - 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"); - 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"), 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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"); - 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"); - 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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_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", 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_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)); - shouldContinue = true; - 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)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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)); - 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: 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 3f: 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 16: { - LogStep(16, "Step 4a: 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 17: { - LogStep(17, - "Step 4b: 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"), 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 5a: 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); - } - case 19: { - LogStep(19, - "Step 5b: TH reads from the DUT the GeneratedCommandList attribute. 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); - } - } - 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"); - 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"); - 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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("DGGEN.S.E00 && PICS_EVENT_LIST_ENABLED"), 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("DGGEN.S.E01 && PICS_EVENT_LIST_ENABLED"), 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("DGGEN.S.E02 && PICS_EVENT_LIST_ENABLED"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"); - 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"), 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"), 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", 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_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)); - shouldContinue = true; - 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, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - 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, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - 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: Wait for the commissioned device to be retrieved"); - ListFreer 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 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 10: { - LogStep(10, "Step 6a: TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, - "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 12: { - LogStep(12, "Step 7a: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, - "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", 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_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)); - shouldContinue = true; - 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; - 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))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", 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, 0UL)); - 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)); - shouldContinue = true; - 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("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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)); - 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"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, IcdManagement::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: TH reads FeatureMap attribute from DUT"); - 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: TH reads FeatureMap attribute from DUT"); - 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: TH reads AttributeList attribute from DUT"); - 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: TH reads AttributeList attribute from DUT"); - 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 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"), 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 5a: 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 11: { - LogStep(11, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: TH reads AcceptedCommandList attribute from DUT"); - VerifyOrDo(!ShouldSkip(" !ICDM.S.F00 && !ICDM.S.C03.Rsp "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "Step 6b: TH reads AcceptedCommandList attribute from DUT if ICDM.S.F00 is true"); - VerifyOrDo(!ShouldSkip("ICDM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), IcdManagement::Id, - IcdManagement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "Step 6c: 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 15: { - LogStep(15, - "Step 6d: 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"), 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 7a: TH reads GeneratedCommandList attribute from DUT"); - 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 17: { - LogStep(17, "Step 7a: TH reads GeneratedCommandList attribute from DUT"); - 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 18: { - LogStep(18, - "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_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, 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: TH reads AttributeList from DUT"); - 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: TH reads AttributeList from DUT"); - 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 && PICS_EVENT_LIST_ENABLED"), 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 && PICS_EVENT_LIST_ENABLED"), 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, "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), 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"); - 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.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.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"), 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"), 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.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"), 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"); - 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"); - 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"); - 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"); - 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"), 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"), 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.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.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"), 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"); - 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"); - 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", 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_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)); - 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(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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)); - 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))); - { - 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)); - 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("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, - "Step 4d: 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 9: { - LogStep(9, "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), ModeSelect::Id, ModeSelect::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: TH reads AcceptedCommandList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, - "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"), 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 7a: TH reads GeneratedCommandList attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, - "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 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", 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_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)); - shouldContinue = true; - 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)); - } - 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, 64UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); - } - 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))); - { - 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)); - 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), 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 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"), 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 5: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, "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 12: { - LogStep(12, - "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"), 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 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, - "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_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", 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_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)); - 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)); - } - 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)); - shouldContinue = true; - 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)); - 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, 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, 0UL)); - 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)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - 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::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 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, 4UL)); - } - 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 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 4c: 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"), 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 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 8: { - LogStep(8, "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 9: { - LogStep(9, - "Step 5c: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 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 11: { - LogStep(11, "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 12: { - LogStep(12, "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 13: { - LogStep(13, "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 14: { - LogStep(14, - "Step 6e: 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 15: { - LogStep(15, "Step 7a: 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); - } - case 16: { - LogStep(16, "Step 7a: 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); - } - case 17: { - LogStep(17, - "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_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 && PICS_EVENT_LIST_ENABLED"), 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", "enum16")); - 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", "enum16")); - 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"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, - PressureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Step 3: Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip(" !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 3: Given PRS.S.F00(EXT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("PRS.S.F00"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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"); - 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.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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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.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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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"), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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 && PICS_EVENT_LIST_ENABLED"), 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 && PICS_EVENT_LIST_ENABLED"), 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))); - { - 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))); - { - 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("!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", 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_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))); - { - 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, 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); - } - case 13: { - LogStep(13, "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 && PICS_EVENT_LIST_ENABLED"), 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 && PICS_EVENT_LIST_ENABLED"), 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", 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_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)); - shouldContinue = true; - 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)); - 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("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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 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 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"), 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 5a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, - "Step 5b: Read the global attribute: AcceptedCommandList. 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 8: { - LogStep(8, "Step 6a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, - "Step 6b: Read the global attribute: GeneratedCommandList. 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 10: { - LogStep(10, - "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 && PICS_EVENT_LIST_ENABLED"), 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", 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_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)); - shouldContinue = true; - 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)); - { - 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 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("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 23: - 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), 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(" !DGTHREAD.S.E00 && !DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED"), - 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("DGTHREAD.S.E00 && PICS_EVENT_LIST_ENABLED"), 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("DGTHREAD.S.E01 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::EventList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, - "Step 5d: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 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 20: { - LogStep(20, "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 21: { - LogStep(21, - "Step 6c: 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 22: { - LogStep(22, "Step 7a: TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, - ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, - "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_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", 40, 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)); - shouldContinue = true; - 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, 3UL)); - } - 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(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("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(CheckConstraintExcludes("value", value, 0UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 1UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); - } - 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(CheckConstraintContains("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(CheckConstraintExcludes("value", value, 4UL)); - } - 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))); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - 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, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } - 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, 2UL)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 4UL)); - } - 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, 5UL)); - } - 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, 5UL)); - } - 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, 1UL)); - } - 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, 1UL)); - } - 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)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - 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(CheckConstraintExcludes("value", value, 3UL)); - } - break; - case 39: - 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, "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, - "TS4: Check for mandatory attributes in 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"), 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, "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 24: { - LogStep(24, "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 25: { - LogStep(25, "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 26: { - LogStep(26, "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 27: { - LogStep(27, "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 28: { - LogStep(28, - "TS5: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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, "TS6: Check for mandatory commands in AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeSynchronization::Id, - TimeSynchronization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "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 31: { - LogStep(31, "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 32: { - LogStep(32, "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 33: { - LogStep(33, "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 34: { - LogStep(34, "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 35: { - LogStep(35, "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 36: { - LogStep(36, - "TS6: Check for mandatory commands in AcceptedCommandList. 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 37: { - LogStep(37, "TS7: Check for TZ feature-based commands in GeneratedCommandList"); - 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 38: { - LogStep(38, "TS7: Check for TZ feature-based commands in not GeneratedCommandList"); - 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 39: { - LogStep(39, - "TS7: Check for mandatory commands in GeneratedCommandList. 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); - } - } - 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"); - 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"); - 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"), 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"), 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"), 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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"), 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(" !DGWIFI.S.E00 && !DGWIFI.S.E01 && !DGWIFI.S.E02 && PICS_EVENT_LIST_ENABLED"), - 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("DGWIFI.S.E00 && PICS_EVENT_LIST_ENABLED"), 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("DGWIFI.S.E01 && PICS_EVENT_LIST_ENABLED"), 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("DGWIFI.S.E02 && PICS_EVENT_LIST_ENABLED"), 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"); - 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.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"), 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"), 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.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"), 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"), 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"), 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"), 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"); - 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.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.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.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"); - 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, 17UL)); - VerifyOrReturn(CheckValue("deviceTypeList[0].revision", iter_0.GetValue().revision, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("deviceTypeList", iter_0, 1)); - VerifyOrReturn(CheckValue("deviceTypeList[1].deviceType", iter_0.GetValue().deviceType, 22UL)); - VerifyOrReturn(CheckValue("deviceTypeList[1].revision", iter_0.GetValue().revision, 1U)); - VerifyOrReturn(CheckNoMoreListItems("deviceTypeList", iter_0, 2)); - } - } - 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"); - 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 "), 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"), 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"), 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"), 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"), 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"), 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"), 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 )"), 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"), 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("DGSW.S.E00 && PICS_EVENT_LIST_ENABLED"), 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(" !DGSW.S.E00 && PICS_EVENT_LIST_ENABLED "), 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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"), 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 "), 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"), 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"), 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("DRLK.S.F05 && PICS_EVENT_LIST_ENABLED"), 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("DRLK.S.F08 && PICS_EVENT_LIST_ENABLED"), 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", 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_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)); - 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))); - { - 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)); - shouldContinue = true; - 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; - 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))); - { - 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)); - 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), 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 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"), 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 5a: 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 14: { - LogStep(14, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: 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 16: { - LogStep(16, "Step 6a: 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 17: { - LogStep( - 17, - "Step 6b: TH reads from the DUT the AcceptedCommandList attribute. 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 18: { - LogStep(18, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ActivatedCarbonFilterMonitoring::Id, - ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep( - 19, - "Step 7b: TH reads from the DUT the GeneratedCommandList attribute. 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); - } - } - 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", 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_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)); - 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))); - { - 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)); - shouldContinue = true; - 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")); - } - 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)); - { - 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)); - 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), 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 4f: TH reads from the DUT the AttributeList attribute. 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 13: { - LogStep(13, "Step 5a: 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 14: { - LogStep(14, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, - "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 17: { - LogStep(17, "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 18: { - LogStep(18, "Step 7a: Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), HepaFilterMonitoring::Id, - HepaFilterMonitoring::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, - "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_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_DA_1_8Suite : public TestCommand -{ -public: - Test_TC_DA_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_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_DA_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_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", 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_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)); - shouldContinue = true; - 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; - 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))); - { - 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 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(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 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: 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, "Step 3: 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, "Step 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, "Step 4b: 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, - "Step 4c: 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, - "Step 4c: 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, - "Step 4d: TH reads the AttributeList attribute from the 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 10: { - LogStep(10, "Step 5a: Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcCleanMode::Id, RvcCleanMode::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep( - 11, - "Step 5b: Read the global attribute: EventList from the 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: 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 13: { - LogStep(13, - "Step 6b: Read the global attribute AcceptedCommandList. 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 14: { - LogStep(14, - "Step 7a: 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); - } - case 15: { - LogStep(15, - "Step 7b: Read the global attribute: GeneratedCommandList. 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); - } - } - 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_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_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_RVCRUNM_1_1Suite : public TestCommand -{ -public: - Test_TC_RVCRUNM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_RVCRUNM_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_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)); - shouldContinue = true; - 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; - 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))); - { - 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 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(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 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: 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, "Step 3a: 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, "Step 3b: 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, "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), RvcRunMode::Id, RvcRunMode::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), RvcRunMode::Id, RvcRunMode::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("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, - "Step 4c: 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, - "Step 4d: 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, - "Step 4e: Check for mandatory attributes in 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"), 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 5a: Read the global attribute: EventList from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RvcRunMode::Id, RvcRunMode::Attributes::EventList::Id, true, - chip::NullOptional); - } - case 11: { - LogStep(11, - "Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED"), 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 6a: 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 13: { - LogStep(13, - "Step 6b: Read the global attribute AcceptedCommandList. 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 14: { - LogStep(14, - "Step 7a: 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); - } - case 15: { - LogStep(15, - "Step 7b: Read the global attribute: GeneratedCommandList. 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); - } - } - 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_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 4: Read AttributeList (global attribute 65531) if S.S.A0005 is true"); - VerifyOrDo(!ShouldSkip("S.S.A0005 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is true"); - VerifyOrDo(!ShouldSkip("S.S.A0005 && !PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is false"); - VerifyOrDo(!ShouldSkip(" !S.S.A0005 && PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Scenes::Id, Scenes::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 7: { - LogStep(7, "Step 4: Read AttributeList (global attribute 65531) if S.S.A0005 is false"); - VerifyOrDo(!ShouldSkip(" !S.S.A0005 && !PICS_EVENT_LIST_ENABLED"), 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), -#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..d80f332a2f2526 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]; @@ -213,7 +219,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]; @@ -258,7 +268,11 @@ 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]; @@ -287,7 +301,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]; @@ -322,7 +340,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)]; @@ -362,7 +384,11 @@ 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]; @@ -388,7 +414,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)]; @@ -428,7 +458,11 @@ 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]; @@ -454,7 +488,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)]; @@ -494,7 +532,11 @@ 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]; @@ -520,7 +562,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)]; @@ -562,7 +608,11 @@ 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]; @@ -588,7 +638,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)]; @@ -630,7 +684,11 @@ 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]; @@ -656,7 +714,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)]; @@ -696,7 +758,11 @@ 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]; @@ -722,7 +788,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)]; @@ -762,7 +832,11 @@ 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]; @@ -788,7 +862,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)]; @@ -852,7 +930,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]; @@ -900,7 +982,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]; @@ -946,7 +1032,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]; @@ -1001,7 +1091,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]; @@ -1046,7 +1140,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]; @@ -1089,7 +1187,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]; @@ -1136,7 +1238,11 @@ 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]; @@ -1162,7 +1268,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)]; @@ -1202,7 +1312,11 @@ 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]; @@ -1228,7 +1342,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)]; @@ -1268,7 +1386,11 @@ 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]; @@ -1294,7 +1416,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)]; @@ -1336,7 +1462,11 @@ 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]; @@ -1362,7 +1492,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)]; @@ -1404,7 +1538,11 @@ 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]; @@ -1430,7 +1568,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)]; @@ -1470,7 +1612,11 @@ 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]; @@ -1496,7 +1642,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)]; @@ -1536,7 +1686,11 @@ 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]; @@ -1562,7 +1716,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)]; @@ -1641,7 +1799,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]; @@ -1715,7 +1877,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]; @@ -1762,7 +1928,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]; @@ -1809,7 +1979,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]; @@ -1856,7 +2030,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]; @@ -1905,7 +2083,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]; @@ -1959,7 +2141,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]; @@ -2010,7 +2196,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]; @@ -2085,7 +2275,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]; @@ -2136,7 +2330,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]; @@ -2185,7 +2383,11 @@ 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]; @@ -2211,7 +2413,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)]; @@ -2251,7 +2457,11 @@ 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]; @@ -2277,7 +2487,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)]; @@ -2317,7 +2531,11 @@ 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]; @@ -2343,7 +2561,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)]; @@ -2383,7 +2605,11 @@ 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]; @@ -2409,7 +2635,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)]; @@ -2449,7 +2679,11 @@ 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]; @@ -2475,7 +2709,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)]; @@ -2515,7 +2753,11 @@ 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]; @@ -2541,7 +2783,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)]; @@ -2583,7 +2829,11 @@ 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]; @@ -2609,7 +2859,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)]; @@ -2652,7 +2906,11 @@ 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]; @@ -2678,7 +2936,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)]; @@ -2720,7 +2982,11 @@ 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]; @@ -2746,7 +3012,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)]; @@ -2786,7 +3056,11 @@ 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]; @@ -2812,7 +3086,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)]; @@ -2854,7 +3132,11 @@ 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]; @@ -2880,7 +3162,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)]; @@ -2922,7 +3208,11 @@ 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]; @@ -2948,7 +3238,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)]; @@ -2988,7 +3282,11 @@ 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]; @@ -3014,7 +3312,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)]; @@ -3054,7 +3356,11 @@ 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]; @@ -3080,7 +3386,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)]; @@ -3146,7 +3456,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]; @@ -3187,7 +3501,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]; @@ -3228,7 +3546,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]; @@ -3271,7 +3593,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]; @@ -3315,7 +3641,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]; @@ -3359,7 +3689,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]; @@ -3405,7 +3739,11 @@ 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]; @@ -3431,7 +3769,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)]; @@ -3471,7 +3813,11 @@ 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]; @@ -3497,7 +3843,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)]; @@ -3537,7 +3887,11 @@ 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]; @@ -3566,7 +3920,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]; @@ -3601,7 +3959,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)]; @@ -3641,7 +4003,11 @@ 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]; @@ -3670,7 +4036,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]; @@ -3705,7 +4075,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)]; @@ -3745,7 +4119,11 @@ 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]; @@ -3774,7 +4152,11 @@ 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]; @@ -3809,7 +4191,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)]; @@ -3849,7 +4235,11 @@ 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]; @@ -3875,7 +4265,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)]; @@ -3915,7 +4309,11 @@ 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]; @@ -3941,7 +4339,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)]; @@ -3983,7 +4385,11 @@ 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]; @@ -4009,7 +4415,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)]; @@ -4051,7 +4461,11 @@ 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]; @@ -4077,7 +4491,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)]; @@ -4117,7 +4535,11 @@ 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]; @@ -4143,7 +4565,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)]; @@ -4183,7 +4609,11 @@ 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]; @@ -4209,7 +4639,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)]; @@ -4267,7 +4701,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 @@ -4295,7 +4733,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) @@ -4337,7 +4779,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 @@ -4368,7 +4814,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) @@ -4405,7 +4855,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) @@ -4447,7 +4901,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 @@ -4475,7 +4934,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) @@ -4517,7 +4980,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 @@ -4545,7 +5013,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) @@ -4589,7 +5061,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 @@ -4617,7 +5093,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) @@ -4661,7 +5141,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 @@ -4689,7 +5173,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) @@ -4731,7 +5219,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 @@ -4759,7 +5251,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) @@ -4801,7 +5297,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 @@ -4829,7 +5329,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) @@ -4913,7 +5417,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 @@ -4969,7 +5477,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 @@ -5026,7 +5538,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 @@ -5081,7 +5597,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 @@ -5131,7 +5651,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 @@ -5187,7 +5711,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 @@ -5244,7 +5772,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 @@ -5299,7 +5831,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 @@ -5346,7 +5882,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 @@ -5392,7 +5932,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 @@ -5420,7 +5964,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) @@ -5462,7 +6010,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 @@ -5490,7 +6042,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) @@ -5532,7 +6088,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 @@ -5560,7 +6120,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) @@ -5602,7 +6166,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 @@ -5630,7 +6198,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) @@ -5672,7 +6244,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 @@ -5700,7 +6276,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) @@ -5742,7 +6322,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 @@ -5770,7 +6354,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) @@ -5812,7 +6400,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 @@ -5840,7 +6432,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) @@ -5882,7 +6478,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 @@ -5913,7 +6513,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) @@ -5950,7 +6554,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) @@ -5992,7 +6600,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 @@ -6023,7 +6635,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) @@ -6060,7 +6676,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) @@ -6102,7 +6722,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 @@ -6133,7 +6757,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) @@ -6170,7 +6798,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) @@ -6212,7 +6844,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 @@ -6243,7 +6879,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) @@ -6280,7 +6920,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) @@ -6322,7 +6966,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 @@ -6353,7 +7001,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) @@ -6390,7 +7042,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) @@ -6432,7 +7088,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 @@ -6463,7 +7123,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) @@ -6500,7 +7164,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) @@ -6542,7 +7210,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 @@ -6573,7 +7245,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) @@ -6610,7 +7286,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) @@ -6652,7 +7332,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 @@ -6680,7 +7364,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) @@ -6722,7 +7410,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 @@ -6750,7 +7442,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) @@ -6794,7 +7490,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 @@ -6822,7 +7522,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) @@ -6866,7 +7570,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 @@ -6894,7 +7602,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) @@ -6936,7 +7648,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 @@ -6964,7 +7680,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) @@ -7006,7 +7726,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 @@ -7034,7 +7758,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) @@ -7101,7 +7829,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 @@ -7132,7 +7864,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) @@ -7171,7 +7907,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) @@ -7213,7 +7953,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 @@ -7244,7 +7988,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) @@ -7283,7 +8031,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) @@ -7325,7 +8077,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 @@ -7356,7 +8112,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) @@ -7395,7 +8155,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) @@ -7437,7 +8201,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 @@ -7468,7 +8236,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) @@ -7505,7 +8277,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) @@ -7547,7 +8323,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 @@ -7575,7 +8355,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) @@ -7617,7 +8401,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 @@ -7648,7 +8436,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) @@ -7685,7 +8477,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) @@ -7727,7 +8523,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 @@ -7758,7 +8558,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) @@ -7795,7 +8599,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) @@ -7837,7 +8645,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 @@ -7865,7 +8677,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) @@ -7907,7 +8723,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 @@ -7935,7 +8755,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) @@ -7977,7 +8801,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 @@ -8005,7 +8833,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) @@ -8047,7 +8879,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 @@ -8075,7 +8911,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) @@ -8119,7 +8959,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 @@ -8147,7 +8991,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) @@ -8191,7 +9039,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 @@ -8219,7 +9071,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) @@ -8261,7 +9117,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 @@ -8289,7 +9149,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) @@ -8331,7 +9195,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 @@ -8359,7 +9227,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) @@ -8420,7 +9292,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 @@ -8448,7 +9324,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) @@ -8493,7 +9373,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 @@ -8521,7 +9405,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) @@ -8566,7 +9454,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 @@ -8594,7 +9486,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) @@ -8639,7 +9535,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 @@ -8667,7 +9567,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) @@ -8712,7 +9616,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 @@ -8740,7 +9648,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) @@ -8785,7 +9697,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 @@ -8813,7 +9729,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) @@ -8878,7 +9798,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 @@ -8906,7 +9830,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) @@ -8948,7 +9876,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 @@ -8976,7 +9908,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) @@ -9018,7 +9954,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 @@ -9046,7 +9986,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) @@ -9088,7 +10032,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 @@ -9116,7 +10064,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) @@ -9158,7 +10110,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 @@ -9186,7 +10142,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) @@ -9228,7 +10188,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 @@ -9256,7 +10220,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) @@ -9298,7 +10266,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 @@ -9326,7 +10298,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) @@ -9370,7 +10346,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 @@ -9398,7 +10378,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) @@ -9442,7 +10426,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 @@ -9470,7 +10458,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) @@ -9512,7 +10504,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 @@ -9540,7 +10536,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) @@ -9582,7 +10582,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 @@ -9610,7 +10614,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) @@ -9669,7 +10677,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]; @@ -9704,7 +10716,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]; @@ -9770,7 +10786,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)]; @@ -9810,7 +10830,11 @@ 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]; @@ -9836,7 +10860,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)]; @@ -9876,7 +10904,11 @@ 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]; @@ -9902,7 +10934,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)]; @@ -9944,7 +10980,11 @@ 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]; @@ -9970,7 +11010,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)]; @@ -10012,7 +11056,11 @@ 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]; @@ -10038,7 +11086,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)]; @@ -10078,7 +11130,11 @@ 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]; @@ -10104,7 +11160,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)]; @@ -10144,7 +11204,11 @@ 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]; @@ -10170,7 +11234,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)]; @@ -10233,7 +11301,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 @@ -10270,7 +11342,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) @@ -10363,7 +11439,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) @@ -10405,7 +11485,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 @@ -10442,7 +11526,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) @@ -10493,7 +11581,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) @@ -10535,7 +11627,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 @@ -10563,7 +11659,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) @@ -10605,7 +11705,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 @@ -10633,7 +11737,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) @@ -10675,7 +11783,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 @@ -10703,7 +11815,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) @@ -10745,7 +11861,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 @@ -10773,7 +11893,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) @@ -10815,7 +11939,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 @@ -10843,7 +11971,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) @@ -10887,7 +12019,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 @@ -10915,7 +12051,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) @@ -10959,7 +12099,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 @@ -10987,7 +12131,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) @@ -11029,7 +12177,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 @@ -11057,7 +12209,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) @@ -11099,7 +12255,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 @@ -11127,7 +12287,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) @@ -11203,7 +12367,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]; @@ -11254,7 +12422,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]; @@ -11305,7 +12477,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]; @@ -11356,7 +12532,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]; @@ -11407,7 +12587,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]; @@ -11457,7 +12641,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]; @@ -11508,7 +12696,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]; @@ -11559,7 +12751,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]; @@ -11609,7 +12805,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]; @@ -11660,7 +12860,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]; @@ -11711,7 +12915,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]; @@ -11762,7 +12970,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]; @@ -11812,7 +13024,11 @@ 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]; @@ -11838,7 +13054,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)]; @@ -11878,7 +13098,11 @@ 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]; @@ -11904,7 +13128,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)]; @@ -11944,7 +13172,11 @@ 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]; @@ -11970,7 +13202,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)]; @@ -12010,7 +13246,11 @@ 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]; @@ -12036,7 +13276,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)]; @@ -12076,7 +13320,11 @@ 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]; @@ -12102,7 +13350,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)]; @@ -12144,7 +13396,11 @@ 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]; @@ -12170,7 +13426,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)]; @@ -12212,7 +13472,11 @@ 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]; @@ -12238,7 +13502,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)]; @@ -12278,7 +13546,11 @@ 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]; @@ -12304,7 +13576,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)]; @@ -12344,7 +13620,11 @@ 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]; @@ -12370,7 +13650,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)]; @@ -12452,7 +13736,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 @@ -12480,7 +13768,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) @@ -12522,7 +13814,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 @@ -12550,7 +13846,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) @@ -12592,7 +13892,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 @@ -12620,7 +13924,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) @@ -12662,7 +13970,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 @@ -12690,7 +14002,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) @@ -12732,7 +14048,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 @@ -12760,7 +14080,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) @@ -12802,7 +14126,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 @@ -12833,7 +14161,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) @@ -12872,7 +14204,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) @@ -12914,7 +14250,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 @@ -12945,7 +14285,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) @@ -12984,7 +14328,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) @@ -13026,7 +14374,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 @@ -13054,7 +14406,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) @@ -13096,7 +14452,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 @@ -13124,7 +14484,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) @@ -13166,7 +14530,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 @@ -13194,7 +14562,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) @@ -13236,7 +14608,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 @@ -13264,7 +14640,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) @@ -13306,7 +14686,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 @@ -13334,7 +14718,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) @@ -13376,7 +14764,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 @@ -13404,7 +14796,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) @@ -13446,7 +14842,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 @@ -13474,7 +14874,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) @@ -13516,7 +14920,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 @@ -13544,7 +14952,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) @@ -13586,7 +14998,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 @@ -13614,7 +15030,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) @@ -13656,7 +15076,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 @@ -13687,7 +15111,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) @@ -13724,7 +15152,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) @@ -13766,7 +15198,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 @@ -13794,7 +15230,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) @@ -13836,7 +15276,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 @@ -13864,7 +15308,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) @@ -13906,7 +15354,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 @@ -13935,7 +15387,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) @@ -13977,7 +15433,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 @@ -14006,7 +15466,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) @@ -14048,7 +15512,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 @@ -14076,7 +15544,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) @@ -14118,7 +15590,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 @@ -14146,7 +15622,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) @@ -14190,7 +15670,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 @@ -14218,7 +15702,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) @@ -14262,7 +15750,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 @@ -14290,7 +15782,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) @@ -14332,7 +15828,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 @@ -14360,7 +15860,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) @@ -14402,7 +15906,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 @@ -14430,7 +15938,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) @@ -14499,7 +16011,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 @@ -14584,7 +16100,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 @@ -14634,7 +16154,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 @@ -14681,7 +16205,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 @@ -14709,7 +16238,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) @@ -14751,7 +16285,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 @@ -14779,7 +16318,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) @@ -14823,7 +16366,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 @@ -14851,7 +16398,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) @@ -14895,7 +16446,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 @@ -14923,7 +16478,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) @@ -14965,7 +16524,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 @@ -14993,7 +16556,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) @@ -15035,7 +16602,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 @@ -15063,7 +16634,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) @@ -15133,7 +16708,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 @@ -15188,7 +16767,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 @@ -15227,7 +16811,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) @@ -15280,7 +16869,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) @@ -15322,7 +16916,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 @@ -15350,7 +16948,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) @@ -15392,7 +16994,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 @@ -15420,7 +17026,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) @@ -15462,7 +17072,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 @@ -15490,7 +17105,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) @@ -15532,7 +17152,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 @@ -15560,7 +17185,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) @@ -15602,7 +17232,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 @@ -15630,7 +17265,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) @@ -15674,7 +17314,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 @@ -15702,7 +17346,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) @@ -15746,7 +17394,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 @@ -15774,7 +17426,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) @@ -15816,7 +17472,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 @@ -15844,7 +17504,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) @@ -15886,7 +17550,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 @@ -15914,7 +17582,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) @@ -15974,7 +17646,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 @@ -16005,7 +17681,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) @@ -16044,7 +17724,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) @@ -16086,7 +17770,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 @@ -16114,7 +17802,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) @@ -16156,7 +17848,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 @@ -16184,7 +17881,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) @@ -16226,7 +17928,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 @@ -16254,7 +17961,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) @@ -16298,7 +18009,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 @@ -16326,7 +18041,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) @@ -16370,7 +18089,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 @@ -16398,7 +18121,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) @@ -16440,7 +18167,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 @@ -16468,7 +18199,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) @@ -16510,7 +18245,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 @@ -16538,7 +18277,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) @@ -16599,7 +18342,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 @@ -16630,7 +18377,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) @@ -16667,7 +18418,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) @@ -16709,7 +18464,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 @@ -16740,7 +18499,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) @@ -16777,7 +18540,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) @@ -16819,7 +18586,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 @@ -16847,7 +18619,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) @@ -16889,7 +18665,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 @@ -16917,7 +18697,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) @@ -16959,7 +18743,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 @@ -16987,7 +18775,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) @@ -17031,7 +18823,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 @@ -17059,7 +18855,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) @@ -17103,7 +18903,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 @@ -17131,7 +18935,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) @@ -17173,7 +18981,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 @@ -17201,7 +19013,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) @@ -17243,7 +19059,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 @@ -17271,7 +19091,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) @@ -17330,7 +19154,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 @@ -17361,7 +19189,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) @@ -17398,7 +19230,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) @@ -17440,7 +19276,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 @@ -17468,7 +19308,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) @@ -17510,7 +19354,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 @@ -17538,7 +19386,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) @@ -17582,7 +19434,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 @@ -17610,7 +19466,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) @@ -17654,7 +19514,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 @@ -17682,7 +19546,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) @@ -17724,7 +19592,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 @@ -17752,7 +19624,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) @@ -17794,7 +19670,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 @@ -17822,7 +19702,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) @@ -17881,7 +19765,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 @@ -17909,7 +19797,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) @@ -17951,7 +19843,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 @@ -17979,7 +19876,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) @@ -18021,7 +19922,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 @@ -18049,7 +19955,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) @@ -18093,7 +20003,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 @@ -18121,7 +20035,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) @@ -18165,7 +20083,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 @@ -18193,7 +20115,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) @@ -18235,7 +20161,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 @@ -18263,7 +20193,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) @@ -18305,7 +20239,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 @@ -18333,7 +20271,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) @@ -18426,7 +20368,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 @@ -18454,7 +20400,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) @@ -18496,7 +20446,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 @@ -18524,7 +20478,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) @@ -18566,7 +20524,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 @@ -18594,7 +20556,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) @@ -18636,7 +20602,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 @@ -18664,7 +20634,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) @@ -18706,7 +20680,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 @@ -18734,7 +20712,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) @@ -18776,7 +20758,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 @@ -18804,7 +20790,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) @@ -18846,7 +20836,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 @@ -18874,7 +20868,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) @@ -18916,7 +20914,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 @@ -18944,7 +20946,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) @@ -18986,7 +20992,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 @@ -19014,7 +21024,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) @@ -19056,7 +21070,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 @@ -19084,7 +21102,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) @@ -19126,7 +21148,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 @@ -19154,7 +21180,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) @@ -19196,7 +21226,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 @@ -19224,7 +21258,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) @@ -19266,7 +21304,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 @@ -19294,7 +21336,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) @@ -19336,7 +21382,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 @@ -19364,7 +21414,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) @@ -19406,7 +21460,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 @@ -19434,7 +21492,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) @@ -19476,7 +21538,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 @@ -19504,7 +21570,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) @@ -19546,7 +21616,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 @@ -19574,7 +21648,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) @@ -19616,7 +21694,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 @@ -19644,7 +21726,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) @@ -19686,7 +21772,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 @@ -19714,7 +21804,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) @@ -19756,7 +21850,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 @@ -19784,7 +21882,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) @@ -19826,7 +21928,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 @@ -19854,7 +21960,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) @@ -19896,7 +22006,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 @@ -19924,7 +22038,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) @@ -19966,7 +22084,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 @@ -19994,7 +22116,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) @@ -20036,7 +22162,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 @@ -20064,7 +22194,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) @@ -20106,7 +22240,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 @@ -20134,7 +22272,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) @@ -20176,7 +22318,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 @@ -20204,7 +22350,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) @@ -20246,7 +22396,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 @@ -20274,7 +22428,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) @@ -20316,7 +22474,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 @@ -20344,7 +22506,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) @@ -20386,7 +22552,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 @@ -20414,7 +22584,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) @@ -20456,7 +22630,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 @@ -20484,7 +22662,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) @@ -20526,7 +22708,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 @@ -20554,7 +22740,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) @@ -20596,7 +22786,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 @@ -20624,7 +22818,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) @@ -20666,7 +22864,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 @@ -20694,7 +22896,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) @@ -20736,7 +22942,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 @@ -20764,7 +22974,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) @@ -20808,7 +23022,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 @@ -20836,7 +23054,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) @@ -20880,7 +23102,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 @@ -20908,7 +23134,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) @@ -20950,7 +23180,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 @@ -20978,7 +23212,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) @@ -21020,7 +23258,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 @@ -21048,7 +23290,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) @@ -21115,7 +23361,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 @@ -21166,7 +23416,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 @@ -21218,7 +23472,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 @@ -21265,7 +23523,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 @@ -21296,7 +23558,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) @@ -21333,7 +23599,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) @@ -21375,7 +23645,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 @@ -21404,7 +23678,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) @@ -21446,7 +23724,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 @@ -21474,7 +23756,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) @@ -21516,7 +23802,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 @@ -21544,7 +23834,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) @@ -21586,7 +23880,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 @@ -21614,7 +23913,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) @@ -21656,7 +23960,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 @@ -21684,7 +23992,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) @@ -21726,7 +24038,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 @@ -21754,7 +24070,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) @@ -21798,7 +24118,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 @@ -21826,7 +24150,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) @@ -21870,7 +24198,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 @@ -21898,7 +24230,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) @@ -21940,7 +24276,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 @@ -21968,7 +24308,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) @@ -22010,7 +24354,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 @@ -22038,7 +24386,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) @@ -22111,7 +24463,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 @@ -22175,7 +24531,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 @@ -22231,7 +24591,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 @@ -22287,7 +24651,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 @@ -22341,7 +24709,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 @@ -22396,7 +24768,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 @@ -22450,7 +24826,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 @@ -22478,7 +24858,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) @@ -22520,7 +24904,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 @@ -22548,7 +24936,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) @@ -22590,7 +24982,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 @@ -22618,7 +25014,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) @@ -22660,7 +25060,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 @@ -22688,7 +25092,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) @@ -22730,7 +25138,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 @@ -22761,7 +25173,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) @@ -22798,7 +25214,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) @@ -22840,7 +25260,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 @@ -22868,7 +25292,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) @@ -22910,7 +25338,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 @@ -22938,7 +25370,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) @@ -22980,7 +25416,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 @@ -23008,7 +25448,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) @@ -23050,7 +25494,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 @@ -23078,7 +25526,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) @@ -23120,7 +25572,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 @@ -23148,7 +25604,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) @@ -23192,7 +25652,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 @@ -23220,7 +25684,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) @@ -23264,7 +25732,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 @@ -23292,7 +25764,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) @@ -23334,7 +25810,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 @@ -23362,7 +25842,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) @@ -23404,7 +25888,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 @@ -23432,7 +25920,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) @@ -23493,7 +25985,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 @@ -23549,7 +26045,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 @@ -23577,7 +26077,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) @@ -23619,7 +26123,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 @@ -23647,7 +26155,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) @@ -23691,7 +26203,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 @@ -23719,7 +26235,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) @@ -23763,7 +26283,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 @@ -23791,7 +26315,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) @@ -23833,7 +26361,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 @@ -23861,7 +26393,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) @@ -23903,7 +26439,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 @@ -23931,7 +26471,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) @@ -24004,7 +26548,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 @@ -24051,7 +26599,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 @@ -24079,7 +26631,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) @@ -24121,7 +26677,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 @@ -24149,7 +26709,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) @@ -24191,7 +26755,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 @@ -24219,7 +26787,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) @@ -24261,7 +26833,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 @@ -24289,7 +26865,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) @@ -24331,7 +26911,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 @@ -24359,7 +26943,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) @@ -24401,7 +26989,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 @@ -24429,7 +27021,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) @@ -24471,7 +27067,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 @@ -24499,7 +27099,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) @@ -24541,7 +27145,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 @@ -24569,7 +27177,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) @@ -24611,7 +27223,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 @@ -24639,7 +27255,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) @@ -24681,7 +27301,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 @@ -24709,7 +27333,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) @@ -24751,7 +27379,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 @@ -24779,7 +27411,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) @@ -24823,7 +27459,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 @@ -24851,7 +27491,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) @@ -24895,7 +27539,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 @@ -24923,7 +27571,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) @@ -24965,7 +27617,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 @@ -24993,7 +27649,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) @@ -25035,7 +27695,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 @@ -25063,7 +27727,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) @@ -25126,7 +27794,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 @@ -25170,7 +27842,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 @@ -25198,7 +27874,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) @@ -25240,7 +27920,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 @@ -25268,7 +27952,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) @@ -25310,7 +27998,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 @@ -25338,7 +28030,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) @@ -25380,7 +28076,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 @@ -25408,7 +28109,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) @@ -25450,7 +28155,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 @@ -25478,7 +28187,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) @@ -25520,7 +28233,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 @@ -25548,7 +28265,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) @@ -25592,7 +28313,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 @@ -25620,7 +28345,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) @@ -25664,7 +28393,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 @@ -25692,7 +28425,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) @@ -25734,7 +28471,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 @@ -25762,7 +28503,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) @@ -25804,7 +28549,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 @@ -25832,7 +28581,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) @@ -25955,7 +28708,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 @@ -25999,7 +28756,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 @@ -26027,7 +28788,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) @@ -26069,7 +28834,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 @@ -26097,7 +28866,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) @@ -26139,7 +28912,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 @@ -26167,7 +28944,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) @@ -26209,7 +28990,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 @@ -26237,7 +29022,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) @@ -26279,7 +29068,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 @@ -26307,7 +29100,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) @@ -26349,7 +29146,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 @@ -26377,7 +29178,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) @@ -26419,7 +29224,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 @@ -26447,7 +29256,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) @@ -26489,7 +29302,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 @@ -26517,7 +29334,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) @@ -26559,7 +29380,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 @@ -26587,7 +29412,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) @@ -26629,7 +29458,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 @@ -26657,7 +29490,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) @@ -26699,7 +29536,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 @@ -26727,7 +29568,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) @@ -26769,7 +29614,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 @@ -26797,7 +29646,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) @@ -26839,7 +29692,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 @@ -26867,7 +29724,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) @@ -26909,7 +29770,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 @@ -26937,7 +29802,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) @@ -26979,7 +29848,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 @@ -27007,7 +29880,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) @@ -27049,7 +29926,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 @@ -27077,7 +29958,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) @@ -27119,7 +30004,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 @@ -27147,7 +30036,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) @@ -27189,7 +30082,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 @@ -27217,7 +30114,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) @@ -27259,7 +30160,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 @@ -27287,7 +30192,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) @@ -27329,7 +30238,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 @@ -27357,7 +30271,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) @@ -27399,7 +30318,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 @@ -27428,7 +30352,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) @@ -27470,7 +30399,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 @@ -27498,7 +30431,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) @@ -27540,7 +30477,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 @@ -27568,7 +30509,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) @@ -27610,7 +30555,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 @@ -27638,7 +30587,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) @@ -27680,7 +30633,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 @@ -27708,7 +30665,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) @@ -27750,7 +30711,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 @@ -27778,7 +30744,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) @@ -27820,7 +30790,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 @@ -27848,7 +30822,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) @@ -27890,7 +30868,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 @@ -27918,7 +30901,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) @@ -27960,7 +30948,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 @@ -27988,7 +30980,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) @@ -28030,7 +31026,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 @@ -28058,7 +31058,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) @@ -28100,7 +31104,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 @@ -28128,7 +31136,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) @@ -28170,7 +31182,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 @@ -28198,7 +31215,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) @@ -28240,7 +31261,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 @@ -28268,7 +31293,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) @@ -28310,7 +31339,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 @@ -28338,7 +31371,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) @@ -28380,7 +31417,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 @@ -28408,7 +31450,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) @@ -28450,7 +31497,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 @@ -28478,7 +31530,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) @@ -28520,7 +31577,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 @@ -28548,7 +31609,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) @@ -28590,7 +31655,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 @@ -28618,7 +31687,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) @@ -28660,7 +31733,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 @@ -28688,7 +31766,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) @@ -28730,7 +31813,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 @@ -28758,7 +31845,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) @@ -28800,7 +31891,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 @@ -28828,7 +31923,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) @@ -28870,7 +31969,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 @@ -28898,7 +32001,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) @@ -28940,7 +32047,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 @@ -28968,7 +32079,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) @@ -29010,7 +32125,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 @@ -29038,7 +32157,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) @@ -29080,7 +32203,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 @@ -29108,7 +32235,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) @@ -29150,7 +32281,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 @@ -29178,7 +32314,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) @@ -29220,7 +32360,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 @@ -29248,7 +32392,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) @@ -29290,7 +32438,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 @@ -29318,7 +32471,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) @@ -29360,7 +32518,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 @@ -29388,7 +32551,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) @@ -29430,7 +32598,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 @@ -29458,7 +32630,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) @@ -29500,7 +32676,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 @@ -29528,7 +32708,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) @@ -29570,7 +32754,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 @@ -29598,7 +32787,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) @@ -29640,7 +32834,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 @@ -29668,7 +32867,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) @@ -29710,7 +32914,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 @@ -29738,7 +32946,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) @@ -29780,7 +32992,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 @@ -29808,7 +33024,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) @@ -29850,7 +33070,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 @@ -29878,7 +33102,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) @@ -29920,7 +33148,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 @@ -29948,7 +33180,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) @@ -29990,7 +33226,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 @@ -30018,7 +33258,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) @@ -30060,7 +33304,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 @@ -30088,7 +33336,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) @@ -30130,7 +33382,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 @@ -30159,7 +33415,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) @@ -30201,7 +33461,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 @@ -30229,7 +33493,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) @@ -30271,7 +33539,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 @@ -30300,7 +33573,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) @@ -30343,7 +33621,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 @@ -30371,7 +33654,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) @@ -30413,7 +33701,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 @@ -30441,7 +33734,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) @@ -30483,7 +33780,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 @@ -30511,7 +33813,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) @@ -30555,7 +33861,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 @@ -30583,7 +33893,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) @@ -30627,7 +33941,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 @@ -30655,7 +33973,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) @@ -30697,7 +34019,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 @@ -30725,7 +34051,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) @@ -30767,7 +34097,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 @@ -30795,7 +34129,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) @@ -30869,7 +34207,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 @@ -30913,7 +34255,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 @@ -30941,7 +34287,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) @@ -30983,7 +34333,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 @@ -31011,7 +34365,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) @@ -31053,7 +34411,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 @@ -31081,7 +34443,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) @@ -31123,7 +34489,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 @@ -31151,7 +34521,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) @@ -31193,7 +34567,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 @@ -31221,7 +34599,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) @@ -31263,7 +34645,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 @@ -31291,7 +34677,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) @@ -31333,7 +34723,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 @@ -31361,7 +34755,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) @@ -31403,7 +34801,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 @@ -31431,7 +34834,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) @@ -31473,7 +34880,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 @@ -31501,7 +34913,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) @@ -31543,7 +34959,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 @@ -31571,7 +34991,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) @@ -31613,7 +35037,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 @@ -31641,7 +35069,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) @@ -31683,7 +35115,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 @@ -31711,7 +35147,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) @@ -31753,7 +35193,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 @@ -31781,7 +35225,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) @@ -31823,7 +35271,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 @@ -31851,7 +35303,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) @@ -31893,7 +35349,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 @@ -31921,7 +35381,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) @@ -31965,7 +35429,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 @@ -31993,7 +35461,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) @@ -32037,7 +35509,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 @@ -32065,7 +35541,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) @@ -32107,7 +35587,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 @@ -32135,7 +35619,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) @@ -32177,7 +35665,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 @@ -32205,7 +35697,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) @@ -32272,7 +35768,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 @@ -32316,7 +35816,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 @@ -32344,7 +35848,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) @@ -32386,7 +35894,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 @@ -32414,7 +35926,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) @@ -32456,7 +35972,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 @@ -32484,7 +36004,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) @@ -32526,7 +36050,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 @@ -32554,7 +36082,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) @@ -32596,7 +36128,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 @@ -32624,7 +36160,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) @@ -32666,7 +36206,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 @@ -32694,7 +36238,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) @@ -32736,7 +36284,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 @@ -32764,7 +36316,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) @@ -32806,7 +36362,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 @@ -32834,7 +36394,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) @@ -32876,7 +36440,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 @@ -32904,7 +36472,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) @@ -32946,7 +36518,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 @@ -32974,7 +36551,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) @@ -33016,7 +36598,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 @@ -33044,7 +36631,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) @@ -33088,7 +36680,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 @@ -33116,7 +36712,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) @@ -33160,7 +36760,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 @@ -33188,7 +36792,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) @@ -33230,7 +36838,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 @@ -33258,7 +36870,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) @@ -33300,7 +36916,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 @@ -33328,7 +36948,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) @@ -33413,7 +37037,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 @@ -33468,7 +37096,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 @@ -33526,7 +37158,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 @@ -33596,7 +37232,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 @@ -33661,7 +37301,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 @@ -33717,7 +37361,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 @@ -33745,7 +37393,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) @@ -33790,7 +37442,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 @@ -33818,7 +37474,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) @@ -33863,7 +37523,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 @@ -33891,7 +37555,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) @@ -33936,7 +37604,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 @@ -33965,7 +37637,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) @@ -34010,7 +37686,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 @@ -34038,7 +37718,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) @@ -34083,7 +37767,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 @@ -34111,7 +37799,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) @@ -34156,7 +37848,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 @@ -34184,7 +37880,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) @@ -34229,7 +37929,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 @@ -34257,7 +37961,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) @@ -34302,7 +38010,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 @@ -34330,7 +38042,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) @@ -34375,7 +38091,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 @@ -34403,7 +38123,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) @@ -34448,7 +38172,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 @@ -34476,7 +38204,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) @@ -34521,7 +38253,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 @@ -34549,7 +38285,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) @@ -34594,7 +38334,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 @@ -34622,7 +38366,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) @@ -34667,7 +38415,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 @@ -34695,7 +38447,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) @@ -34740,7 +38496,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 @@ -34768,7 +38528,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) @@ -34813,7 +38577,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 @@ -34841,7 +38609,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) @@ -34886,7 +38658,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 @@ -34914,7 +38690,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) @@ -34959,7 +38739,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 @@ -34987,7 +38771,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) @@ -35032,7 +38820,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 @@ -35060,7 +38852,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) @@ -35140,7 +38936,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 @@ -35168,7 +38968,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) @@ -35210,7 +39014,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 @@ -35238,7 +39046,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) @@ -35280,7 +39092,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 @@ -35308,7 +39124,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) @@ -35350,7 +39170,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 @@ -35381,7 +39205,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) @@ -35420,7 +39248,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) @@ -35462,7 +39294,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 @@ -35490,7 +39327,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) @@ -35532,7 +39373,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 @@ -35560,7 +39406,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) @@ -35602,7 +39453,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 @@ -35630,7 +39486,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) @@ -35672,7 +39532,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 @@ -35700,7 +39565,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) @@ -35742,7 +39612,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 @@ -35770,7 +39645,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) @@ -35812,7 +39692,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 @@ -35840,7 +39724,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) @@ -35882,7 +39770,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 @@ -35910,7 +39802,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) @@ -35952,7 +39848,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 @@ -35980,7 +39880,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) @@ -36022,7 +39926,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 @@ -36050,7 +39958,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) @@ -36092,7 +40004,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 @@ -36120,7 +40036,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) @@ -36162,7 +40082,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 @@ -36190,7 +40114,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) @@ -36232,7 +40160,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 @@ -36261,7 +40194,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) @@ -36304,7 +40242,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 @@ -36332,7 +40275,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) @@ -36374,7 +40322,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 @@ -36402,7 +40355,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) @@ -36446,7 +40404,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 @@ -36474,7 +40436,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) @@ -36518,7 +40484,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 @@ -36546,7 +40516,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) @@ -36588,7 +40562,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 @@ -36616,7 +40594,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) @@ -36658,7 +40640,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 @@ -36686,7 +40673,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) @@ -36754,7 +40745,11 @@ 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]; @@ -36780,7 +40775,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)]; @@ -36820,7 +40819,11 @@ 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]; @@ -36846,7 +40849,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)]; @@ -36886,7 +40893,11 @@ 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]; @@ -36912,7 +40923,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)]; @@ -36952,7 +40967,11 @@ 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]; @@ -36978,7 +40997,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)]; @@ -37018,7 +41041,11 @@ 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]; @@ -37044,7 +41071,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)]; @@ -37086,7 +41117,11 @@ 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]; @@ -37112,7 +41147,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)]; @@ -37154,7 +41193,11 @@ 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]; @@ -37180,7 +41223,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)]; @@ -37220,7 +41267,11 @@ 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]; @@ -37246,7 +41297,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)]; @@ -37286,7 +41341,11 @@ 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]; @@ -37312,7 +41371,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)]; @@ -37378,7 +41441,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 @@ -37429,7 +41497,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 @@ -37474,7 +41547,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 @@ -37518,7 +41595,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 @@ -37546,7 +41627,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) @@ -37588,7 +41673,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 @@ -37616,7 +41705,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) @@ -37658,7 +41751,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 @@ -37686,7 +41783,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) @@ -37728,7 +41829,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 @@ -37756,7 +41862,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) @@ -37798,7 +41909,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 @@ -37826,7 +41942,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) @@ -37870,7 +41991,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 @@ -37898,7 +42023,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) @@ -37942,7 +42071,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 @@ -37970,7 +42103,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) @@ -38012,7 +42149,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 @@ -38040,7 +42181,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) @@ -38082,7 +42227,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 @@ -38110,7 +42259,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) @@ -38182,7 +42335,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 @@ -38230,7 +42387,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 @@ -38280,7 +42441,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 @@ -38337,7 +42502,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 @@ -38394,7 +42563,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 @@ -38447,7 +42620,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 @@ -38497,7 +42674,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 @@ -38545,7 +42726,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 @@ -38592,7 +42777,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 @@ -38625,7 +42814,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) @@ -38667,7 +42860,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 @@ -38700,7 +42897,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) @@ -38742,7 +42943,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 @@ -38770,7 +42975,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) @@ -38812,7 +43021,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 @@ -38840,7 +43053,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) @@ -38882,7 +43099,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 @@ -38910,7 +43132,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) @@ -38952,7 +43179,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 @@ -38980,7 +43211,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) @@ -39022,7 +43257,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 @@ -39050,7 +43289,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) @@ -39092,7 +43335,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 @@ -39120,7 +43367,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) @@ -39164,7 +43415,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 @@ -39192,7 +43447,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) @@ -39236,7 +43495,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 @@ -39264,7 +43527,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) @@ -39306,7 +43573,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 @@ -39334,7 +43605,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) @@ -39376,7 +43651,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 @@ -39404,7 +43683,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) @@ -39471,7 +43754,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 @@ -39554,7 +43841,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 @@ -39602,7 +43893,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 @@ -39647,7 +43942,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 @@ -39694,7 +43993,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 @@ -39731,7 +44034,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) @@ -39783,7 +44090,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) @@ -39825,7 +44136,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 @@ -39858,7 +44173,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) @@ -39900,7 +44219,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 @@ -39928,7 +44251,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) @@ -39970,7 +44297,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 @@ -39998,7 +44329,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) @@ -40040,7 +44375,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 @@ -40068,7 +44407,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) @@ -40110,7 +44453,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 @@ -40138,7 +44485,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) @@ -40182,7 +44533,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 @@ -40210,7 +44565,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) @@ -40254,7 +44613,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 @@ -40282,7 +44645,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) @@ -40324,7 +44691,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 @@ -40352,7 +44723,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) @@ -40394,7 +44769,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 @@ -40422,7 +44801,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) @@ -40481,7 +44864,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 @@ -40509,7 +44896,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) @@ -40551,7 +44942,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 @@ -40579,7 +44974,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) @@ -40621,7 +45020,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 @@ -40649,7 +45052,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) @@ -40693,7 +45100,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 @@ -40721,7 +45132,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) @@ -40765,7 +45180,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 @@ -40793,7 +45212,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) @@ -40835,7 +45258,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 @@ -40863,7 +45290,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) @@ -40905,7 +45336,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 @@ -40933,7 +45368,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) @@ -40992,7 +45431,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 @@ -41024,7 +45467,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) @@ -41077,7 +45524,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) @@ -41119,7 +45570,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 @@ -41147,7 +45602,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) @@ -41189,7 +45648,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 @@ -41217,7 +45680,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) @@ -41261,7 +45728,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 @@ -41289,7 +45760,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) @@ -41333,7 +45808,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 @@ -41361,7 +45840,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) @@ -41403,7 +45886,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 @@ -41431,7 +45918,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) @@ -41473,7 +45964,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 @@ -41501,7 +45996,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) @@ -41561,7 +46060,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 @@ -41589,7 +46092,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) @@ -41631,7 +46138,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 @@ -41659,7 +46170,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) @@ -41701,7 +46216,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 @@ -41729,7 +46248,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) @@ -41773,7 +46296,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 @@ -41801,7 +46328,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) @@ -41845,7 +46376,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 @@ -41873,7 +46408,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) @@ -41915,7 +46454,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 @@ -41943,7 +46486,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) @@ -41985,7 +46532,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 @@ -42013,7 +46564,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) @@ -42085,7 +46640,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 @@ -42144,7 +46703,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 @@ -42197,7 +46760,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 @@ -42245,7 +46812,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 @@ -42273,7 +46844,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) @@ -42318,7 +46893,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 @@ -42346,7 +46925,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) @@ -42391,7 +46974,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 @@ -42419,7 +47006,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) @@ -42464,7 +47055,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 @@ -42497,7 +47092,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) @@ -42542,7 +47141,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 @@ -42570,7 +47173,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) @@ -42615,7 +47222,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 @@ -42643,7 +47254,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) @@ -42688,7 +47303,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 @@ -42716,7 +47335,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) @@ -42761,7 +47384,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 @@ -42789,7 +47416,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) @@ -42834,7 +47465,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 @@ -42862,7 +47497,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) @@ -42907,7 +47546,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 @@ -42935,7 +47578,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) @@ -42980,7 +47627,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 @@ -43008,7 +47659,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) @@ -43053,7 +47708,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 @@ -43081,7 +47740,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) @@ -43148,7 +47811,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 @@ -43194,7 +47861,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 @@ -43222,7 +47893,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) @@ -43264,7 +47939,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 @@ -43292,7 +47971,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) @@ -43334,7 +48017,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 @@ -43362,7 +48049,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) @@ -43404,7 +48095,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 @@ -43432,7 +48127,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) @@ -43474,7 +48173,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 @@ -43505,7 +48208,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) @@ -43542,7 +48249,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) @@ -43584,7 +48295,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 @@ -43615,7 +48330,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) @@ -43652,7 +48371,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) @@ -43694,7 +48417,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 @@ -43722,7 +48449,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) @@ -43764,7 +48495,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 @@ -43792,7 +48527,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) @@ -43836,7 +48575,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 @@ -43864,7 +48607,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) @@ -43908,7 +48655,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 @@ -43936,7 +48687,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) @@ -43978,7 +48733,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 @@ -44006,7 +48765,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) @@ -44048,7 +48811,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 @@ -44076,7 +48843,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) @@ -44141,7 +48912,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 @@ -44193,7 +48968,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 @@ -44221,7 +49000,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) @@ -44266,7 +49049,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 @@ -44294,7 +49081,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) @@ -44339,7 +49130,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 @@ -44370,7 +49165,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) @@ -44407,7 +49206,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) @@ -44452,7 +49255,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 @@ -44483,7 +49290,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) @@ -44520,7 +49331,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) @@ -44565,7 +49380,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 @@ -44593,7 +49412,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) @@ -44638,7 +49461,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 @@ -44666,7 +49493,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) @@ -44711,7 +49542,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 @@ -44739,7 +49574,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) @@ -44784,7 +49623,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 @@ -44812,7 +49655,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) @@ -44857,7 +49704,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 @@ -44885,7 +49736,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) @@ -44930,7 +49785,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 @@ -44958,7 +49817,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) @@ -45025,7 +49888,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 = @@ -45080,7 +49948,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 = @@ -45109,7 +49982,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 @@ -45155,7 +50033,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 = @@ -45184,7 +50067,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 @@ -45230,7 +50118,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 = @@ -45262,7 +50155,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 @@ -45302,7 +50200,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 @@ -45348,7 +50251,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 = @@ -45380,7 +50288,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 @@ -45418,7 +50331,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 @@ -45464,7 +50382,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 = @@ -45493,7 +50416,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 @@ -45539,7 +50467,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 = @@ -45568,7 +50501,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 @@ -45614,7 +50552,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 = @@ -45643,7 +50586,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 @@ -45689,7 +50637,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 = @@ -45718,7 +50671,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 @@ -45764,7 +50722,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 = @@ -45793,7 +50756,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 @@ -45839,7 +50807,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 = @@ -45868,7 +50841,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 @@ -45936,7 +50914,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 @@ -45964,7 +50946,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) @@ -46009,7 +50995,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 @@ -46040,7 +51030,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) @@ -46077,7 +51071,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) @@ -46122,7 +51120,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 @@ -46153,7 +51155,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) @@ -46190,7 +51196,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) @@ -46235,7 +51245,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 @@ -46263,7 +51277,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) @@ -46308,7 +51326,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 @@ -46336,7 +51358,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) @@ -46381,7 +51407,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 @@ -46409,7 +51439,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) @@ -46454,7 +51488,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 @@ -46482,7 +51520,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) @@ -46527,7 +51569,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 @@ -46555,7 +51601,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) @@ -46600,7 +51650,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 @@ -46628,7 +51682,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) @@ -46673,7 +51731,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 @@ -46701,7 +51763,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) @@ -46768,7 +51834,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 @@ -46820,7 +51890,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 @@ -46848,7 +51922,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) @@ -46893,7 +51971,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 @@ -46921,7 +52003,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) @@ -46966,7 +52052,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 @@ -46997,7 +52087,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) @@ -47034,7 +52128,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) @@ -47079,7 +52177,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 @@ -47110,7 +52212,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) @@ -47147,7 +52253,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) @@ -47192,7 +52302,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 @@ -47220,7 +52334,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) @@ -47265,7 +52383,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 @@ -47293,7 +52415,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) @@ -47338,7 +52464,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 @@ -47366,7 +52496,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) @@ -47411,7 +52545,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 @@ -47439,7 +52577,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) @@ -47484,7 +52626,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 @@ -47512,7 +52658,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) @@ -47557,7 +52707,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 @@ -47585,7 +52739,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) @@ -47652,7 +52810,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 @@ -47704,7 +52866,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 @@ -47732,7 +52898,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) @@ -47777,7 +52947,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 @@ -47805,7 +52979,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) @@ -47850,7 +53028,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 @@ -47881,7 +53063,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) @@ -47918,7 +53104,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) @@ -47963,7 +53153,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 @@ -47994,7 +53188,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) @@ -48031,7 +53229,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) @@ -48076,7 +53278,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 @@ -48104,7 +53310,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) @@ -48149,7 +53359,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 @@ -48177,7 +53391,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) @@ -48222,7 +53440,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 @@ -48250,7 +53472,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) @@ -48295,7 +53521,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 @@ -48323,7 +53553,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) @@ -48368,7 +53602,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 @@ -48396,7 +53634,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) @@ -48441,7 +53683,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 @@ -48469,7 +53715,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) @@ -48539,7 +53789,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 @@ -48598,7 +53852,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 @@ -48626,7 +53884,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) @@ -48671,7 +53933,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 @@ -48699,7 +53965,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) @@ -48744,7 +54014,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 @@ -48772,7 +54046,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) @@ -48817,7 +54095,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 @@ -48845,7 +54127,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) @@ -48890,7 +54176,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 @@ -48918,7 +54208,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) @@ -48963,7 +54257,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 @@ -48991,7 +54290,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) @@ -49036,7 +54339,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 @@ -49064,7 +54371,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) @@ -49109,7 +54420,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 @@ -49137,7 +54452,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) @@ -49182,7 +54501,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 @@ -49210,7 +54533,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) @@ -49255,7 +54582,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 @@ -49283,7 +54614,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) @@ -49328,7 +54663,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 @@ -49356,7 +54695,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) @@ -49401,7 +54744,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 @@ -49429,7 +54776,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) @@ -49496,7 +54847,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 @@ -49524,7 +54879,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) @@ -49569,7 +54928,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 @@ -49597,7 +54960,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) @@ -49642,7 +55009,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 @@ -49670,7 +55041,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) @@ -49715,7 +55090,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 @@ -49743,7 +55122,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) @@ -49788,7 +55171,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 @@ -49816,7 +55203,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) @@ -49861,7 +55252,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 @@ -49889,7 +55284,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) @@ -49934,7 +55333,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 @@ -49962,7 +55365,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) @@ -50007,7 +55414,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 @@ -50035,7 +55446,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) @@ -50080,7 +55495,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 @@ -50108,7 +55527,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) @@ -50175,7 +55598,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 @@ -50227,7 +55654,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 @@ -50255,7 +55686,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) @@ -50300,7 +55735,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 @@ -50328,7 +55767,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) @@ -50373,7 +55816,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 @@ -50404,7 +55851,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) @@ -50441,7 +55892,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) @@ -50486,7 +55941,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 @@ -50517,7 +55976,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) @@ -50554,7 +56017,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) @@ -50599,7 +56066,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 @@ -50627,7 +56098,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) @@ -50672,7 +56147,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 @@ -50700,7 +56179,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) @@ -50745,7 +56228,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 @@ -50773,7 +56260,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) @@ -50818,7 +56309,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 @@ -50846,7 +56341,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) @@ -50891,7 +56390,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 @@ -50919,7 +56422,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) @@ -50964,7 +56471,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 @@ -50992,7 +56503,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) @@ -51056,7 +56571,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 @@ -51084,7 +56603,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) @@ -51129,7 +56652,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 @@ -51157,7 +56684,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) @@ -51202,7 +56733,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 @@ -51230,7 +56765,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) @@ -51275,7 +56814,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 @@ -51303,7 +56846,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) @@ -51348,7 +56895,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 @@ -51376,7 +56927,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) @@ -51421,7 +56976,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 @@ -51449,7 +57008,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) @@ -51494,7 +57057,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 @@ -51522,7 +57089,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) @@ -51608,7 +57179,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 @@ -51656,7 +57231,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 @@ -51684,7 +57263,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) @@ -51729,7 +57312,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 @@ -51757,7 +57344,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) @@ -51802,7 +57393,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 @@ -51830,7 +57425,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) @@ -51875,7 +57474,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 @@ -51903,7 +57506,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) @@ -51948,7 +57555,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 @@ -51976,7 +57587,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) @@ -52021,7 +57636,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 @@ -52049,7 +57668,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) @@ -52094,7 +57717,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 @@ -52122,7 +57749,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) @@ -52167,7 +57798,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 @@ -52195,7 +57830,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) @@ -52240,7 +57879,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 @@ -52268,7 +57911,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) @@ -52313,7 +57960,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 @@ -52341,7 +57992,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) @@ -52386,7 +58041,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 @@ -52414,7 +58073,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) @@ -52459,7 +58122,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 @@ -52490,7 +58157,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) @@ -52527,7 +58198,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) @@ -52572,7 +58247,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 @@ -52600,7 +58279,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) @@ -52645,7 +58328,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 @@ -52673,7 +58360,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) @@ -52718,7 +58409,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 @@ -52746,7 +58441,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) @@ -52791,7 +58490,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 @@ -52819,7 +58522,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) @@ -52864,7 +58571,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 @@ -52892,7 +58603,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) @@ -52937,7 +58652,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 @@ -52965,7 +58684,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) @@ -53010,7 +58733,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 @@ -53038,7 +58765,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) @@ -53107,7 +58838,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 @@ -53155,7 +58890,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 @@ -53205,7 +58944,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 @@ -53233,7 +58976,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) @@ -53278,7 +59025,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 @@ -53306,7 +59057,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) @@ -53351,7 +59106,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 @@ -53379,7 +59138,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) @@ -53424,7 +59187,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 @@ -53452,7 +59219,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) @@ -53497,7 +59268,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 @@ -53525,7 +59300,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) @@ -53570,7 +59349,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 @@ -53598,7 +59381,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) @@ -53643,7 +59430,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 @@ -53671,7 +59462,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) @@ -53716,7 +59511,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 @@ -53744,7 +59543,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) @@ -53789,7 +59592,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 @@ -53817,7 +59624,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) @@ -53862,7 +59673,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 @@ -53890,7 +59705,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) @@ -53963,7 +59782,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 @@ -54010,7 +59833,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 @@ -54057,7 +59884,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 @@ -54104,7 +59935,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 @@ -54154,7 +59989,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 @@ -54182,7 +60021,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) @@ -54227,7 +60070,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 @@ -54255,7 +60102,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) @@ -54300,7 +60151,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 @@ -54328,7 +60183,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) @@ -54373,7 +60232,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 @@ -54401,7 +60264,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) @@ -54446,7 +60313,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 @@ -54474,7 +60345,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) @@ -54519,7 +60394,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 @@ -54548,7 +60427,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) @@ -54593,7 +60476,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 @@ -54621,7 +60508,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) @@ -54666,7 +60557,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 @@ -54694,7 +60589,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) @@ -54739,7 +60638,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 @@ -54767,7 +60670,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) @@ -54812,7 +60719,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 @@ -54840,7 +60751,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) @@ -54885,7 +60800,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 @@ -54913,7 +60832,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) @@ -54958,7 +60881,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 @@ -54986,7 +60913,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) @@ -55059,7 +60990,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 @@ -55106,7 +61041,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 @@ -55153,7 +61092,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 @@ -55200,7 +61143,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 @@ -55250,7 +61197,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 @@ -55278,7 +61229,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) @@ -55323,7 +61278,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 @@ -55351,7 +61310,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) @@ -55396,7 +61359,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 @@ -55424,7 +61391,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) @@ -55469,7 +61440,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 @@ -55497,7 +61472,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) @@ -55542,7 +61521,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 @@ -55570,7 +61553,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) @@ -55615,7 +61602,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 @@ -55644,7 +61635,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) @@ -55689,7 +61684,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 @@ -55717,7 +61716,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) @@ -55762,7 +61765,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 @@ -55790,7 +61797,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) @@ -55835,7 +61846,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 @@ -55863,7 +61878,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) @@ -55908,7 +61927,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 @@ -55936,7 +61959,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) @@ -55981,7 +62008,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 @@ -56009,7 +62040,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) @@ -56054,7 +62089,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 @@ -56082,7 +62121,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) @@ -56150,7 +62193,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 @@ -56198,7 +62245,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 @@ -56226,7 +62277,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) @@ -56271,7 +62326,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 @@ -56299,7 +62358,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) @@ -56344,7 +62407,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 @@ -56372,7 +62439,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) @@ -56417,7 +62488,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 @@ -56445,7 +62520,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) @@ -56490,7 +62569,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 @@ -56521,7 +62604,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) @@ -56558,7 +62645,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) @@ -56603,7 +62694,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 @@ -56631,7 +62726,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) @@ -56676,7 +62775,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 @@ -56704,7 +62807,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) @@ -56749,7 +62856,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 @@ -56777,7 +62888,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) @@ -56822,7 +62937,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 @@ -56850,7 +62969,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) @@ -56895,7 +63018,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 @@ -56923,7 +63050,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) @@ -56968,7 +63099,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 @@ -56996,7 +63131,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) @@ -57041,7 +63180,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 @@ -57069,7 +63212,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) @@ -57137,7 +63284,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 @@ -57185,7 +63336,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 @@ -57213,7 +63368,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) @@ -57258,7 +63417,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 @@ -57286,7 +63450,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) @@ -57331,7 +63500,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 @@ -57359,7 +63533,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) @@ -57404,7 +63583,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 @@ -57432,7 +63616,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) @@ -57477,7 +63666,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 @@ -57508,7 +63702,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) @@ -57546,7 +63745,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) @@ -57591,7 +63795,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 @@ -57619,7 +63828,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) @@ -57664,7 +63878,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 @@ -57692,7 +63911,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) @@ -57737,7 +63961,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 @@ -57765,7 +63994,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) @@ -57810,7 +64044,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 @@ -57838,7 +64076,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) @@ -57883,7 +64125,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 @@ -57911,7 +64158,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) @@ -57956,7 +64207,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 @@ -57984,7 +64239,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) @@ -58029,7 +64288,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 @@ -58057,7 +64321,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) @@ -58177,7 +64446,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]; @@ -58225,7 +64498,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]; @@ -58274,7 +64551,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]; @@ -58329,7 +64610,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]; @@ -58380,7 +64665,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]; @@ -58428,7 +64717,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]; @@ -58476,7 +64769,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]; @@ -58524,7 +64821,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]; @@ -58572,7 +64873,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]; @@ -58620,7 +64925,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]; @@ -58667,7 +64976,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]; @@ -58713,7 +65026,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]; @@ -58763,7 +65080,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]; @@ -58835,7 +65156,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]; @@ -58880,7 +65205,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]; @@ -58930,7 +65259,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]; @@ -58998,7 +65331,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]; @@ -59049,7 +65386,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]; @@ -59103,7 +65444,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]; @@ -59153,7 +65498,11 @@ 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]; @@ -59179,7 +65528,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)]; @@ -59219,7 +65572,11 @@ 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]; @@ -59245,7 +65602,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)]; @@ -59285,7 +65646,11 @@ 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]; @@ -59311,7 +65676,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)]; @@ -59351,7 +65720,11 @@ 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]; @@ -59377,7 +65750,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)]; @@ -59417,7 +65794,11 @@ 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]; @@ -59446,7 +65827,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]; @@ -59481,7 +65866,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)]; @@ -59521,7 +65910,11 @@ 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]; @@ -59550,7 +65943,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]; @@ -59585,7 +65982,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)]; @@ -59625,7 +66026,11 @@ 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]; @@ -59654,7 +66059,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]; @@ -59689,7 +66098,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)]; @@ -59729,7 +66142,11 @@ 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]; @@ -59755,7 +66172,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)]; @@ -59795,7 +66216,11 @@ 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]; @@ -59821,7 +66246,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)]; @@ -59861,7 +66290,11 @@ 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]; @@ -59887,7 +66320,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)]; @@ -59927,7 +66364,12 @@ 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]; @@ -59954,7 +66396,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)]; @@ -59994,7 +66441,12 @@ 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]; @@ -60021,7 +66473,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)]; @@ -60061,7 +66518,11 @@ 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]; @@ -60088,7 +66549,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)]; @@ -60128,7 +66593,11 @@ 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]; @@ -60154,7 +66623,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)]; @@ -60194,7 +66667,11 @@ 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]; @@ -60220,7 +66697,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)]; @@ -60260,7 +66741,11 @@ 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]; @@ -60286,7 +66771,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)]; @@ -60326,7 +66815,11 @@ 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]; @@ -60352,7 +66845,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)]; @@ -60392,7 +66889,11 @@ 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]; @@ -60418,7 +66919,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)]; @@ -60458,7 +66963,12 @@ 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]; @@ -60485,7 +66995,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)]; @@ -60525,7 +67039,11 @@ 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]; @@ -60554,7 +67072,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]; @@ -60591,7 +67113,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)]; @@ -60631,7 +67157,11 @@ 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]; @@ -60660,7 +67190,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]; @@ -60695,7 +67229,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)]; @@ -60735,7 +67273,11 @@ 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]; @@ -60764,7 +67306,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]; @@ -60799,7 +67345,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)]; @@ -60839,7 +67389,11 @@ 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]; @@ -60868,7 +67422,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]; @@ -60903,7 +67461,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)]; @@ -60943,7 +67505,11 @@ 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]; @@ -60972,7 +67538,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]; @@ -61007,7 +67577,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)]; @@ -61047,7 +67621,11 @@ 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]; @@ -61073,7 +67651,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)]; @@ -61113,7 +67695,11 @@ 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]; @@ -61139,7 +67725,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)]; @@ -61179,7 +67769,11 @@ 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]; @@ -61208,7 +67802,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]; @@ -61243,7 +67841,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)]; @@ -61283,7 +67885,11 @@ 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]; @@ -61312,7 +67918,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]; @@ -61347,7 +67957,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)]; @@ -61387,7 +68001,11 @@ 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]; @@ -61416,7 +68034,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]; @@ -61451,7 +68073,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)]; @@ -61491,7 +68117,11 @@ 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]; @@ -61520,7 +68150,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]; @@ -61555,7 +68189,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)]; @@ -61595,7 +68233,11 @@ 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]; @@ -61624,7 +68266,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]; @@ -61659,7 +68305,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)]; @@ -61699,7 +68349,11 @@ 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]; @@ -61728,7 +68382,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]; @@ -61763,7 +68421,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)]; @@ -61803,7 +68465,11 @@ 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]; @@ -61832,7 +68498,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]; @@ -61868,7 +68538,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)]; @@ -61908,7 +68582,11 @@ 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]; @@ -61937,7 +68615,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]; @@ -61972,7 +68654,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)]; @@ -62012,7 +68698,11 @@ 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]; @@ -62041,7 +68731,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]; @@ -62077,7 +68771,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)]; @@ -62117,7 +68815,11 @@ 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]; @@ -62146,7 +68848,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]; @@ -62181,7 +68887,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)]; @@ -62221,7 +68931,11 @@ 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]; @@ -62247,7 +68961,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)]; @@ -62287,7 +69005,11 @@ 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]; @@ -62313,7 +69035,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)]; @@ -62355,7 +69081,11 @@ 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]; @@ -62381,7 +69111,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)]; @@ -62423,7 +69157,11 @@ 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]; @@ -62449,7 +69187,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)]; @@ -62489,7 +69231,11 @@ 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]; @@ -62515,7 +69261,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)]; @@ -62555,7 +69305,11 @@ 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]; @@ -62581,7 +69335,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)]; @@ -62665,7 +69423,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 @@ -62708,7 +69470,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 @@ -62751,7 +69517,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 @@ -62795,7 +69565,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 @@ -62841,7 +69615,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 @@ -62887,7 +69665,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 @@ -62933,7 +69715,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 @@ -62979,7 +69765,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 @@ -63007,7 +69797,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) @@ -63049,7 +69843,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 @@ -63077,7 +69875,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) @@ -63119,7 +69921,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 @@ -63147,7 +69953,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) @@ -63189,7 +69999,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 @@ -63217,7 +70031,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) @@ -63259,7 +70077,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 @@ -63287,7 +70109,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) @@ -63329,7 +70155,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 @@ -63357,7 +70187,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) @@ -63399,7 +70233,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 @@ -63427,7 +70265,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) @@ -63469,7 +70311,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 @@ -63497,7 +70343,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) @@ -63539,7 +70389,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 @@ -63567,7 +70422,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) @@ -63609,7 +70468,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 @@ -63637,7 +70501,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) @@ -63679,7 +70547,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 @@ -63707,7 +70579,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) @@ -63749,7 +70625,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 @@ -63778,7 +70659,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) @@ -63820,7 +70706,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 @@ -63849,7 +70740,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) @@ -63891,7 +70787,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 @@ -63919,7 +70819,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) @@ -63961,7 +70865,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 @@ -63990,7 +70899,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) @@ -64032,7 +70946,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 @@ -64061,7 +70980,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) @@ -64103,7 +71027,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 @@ -64131,7 +71059,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) @@ -64173,7 +71105,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 @@ -64201,7 +71137,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) @@ -64243,7 +71183,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 @@ -64271,7 +71215,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) @@ -64313,7 +71261,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 @@ -64341,7 +71293,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) @@ -64383,7 +71339,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 @@ -64414,7 +71374,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) @@ -64451,7 +71415,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) @@ -64493,7 +71461,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 @@ -64521,7 +71493,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) @@ -64563,7 +71539,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 @@ -64591,7 +71571,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) @@ -64633,7 +71617,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 @@ -64661,7 +71649,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) @@ -64705,7 +71697,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 @@ -64733,7 +71729,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) @@ -64777,7 +71777,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 @@ -64805,7 +71809,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) @@ -64847,7 +71855,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 @@ -64875,7 +71887,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) @@ -64917,7 +71933,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 @@ -64945,7 +71965,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) @@ -65015,7 +72039,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 @@ -65060,7 +72088,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 @@ -65104,7 +72136,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 @@ -65132,7 +72168,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) @@ -65174,7 +72214,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 @@ -65202,7 +72246,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) @@ -65244,7 +72292,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 @@ -65272,7 +72324,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) @@ -65314,7 +72370,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 @@ -65345,7 +72405,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) @@ -65382,7 +72446,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) @@ -65424,7 +72492,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 @@ -65455,7 +72527,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) @@ -65492,7 +72568,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) @@ -65534,7 +72614,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 @@ -65565,7 +72649,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) @@ -65603,7 +72691,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) @@ -65645,7 +72737,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 @@ -65676,7 +72772,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) @@ -65714,7 +72814,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) @@ -65756,7 +72860,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 @@ -65787,7 +72895,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) @@ -65824,7 +72936,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) @@ -65866,7 +72982,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 @@ -65897,7 +73017,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) @@ -65934,7 +73058,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) @@ -65976,7 +73104,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 @@ -66004,7 +73136,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) @@ -66046,7 +73182,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 @@ -66074,7 +73214,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) @@ -66116,7 +73260,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 @@ -66144,7 +73292,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) @@ -66188,7 +73340,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 @@ -66216,7 +73372,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) @@ -66260,7 +73420,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 @@ -66288,7 +73452,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) @@ -66330,7 +73498,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 @@ -66358,7 +73530,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) @@ -66400,7 +73576,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 @@ -66428,7 +73608,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) @@ -66526,7 +73710,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 @@ -66554,7 +73742,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) @@ -66596,7 +73788,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 @@ -66624,7 +73820,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) @@ -66666,7 +73866,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 @@ -66694,7 +73898,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) @@ -66736,7 +73944,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 @@ -66764,7 +73977,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) @@ -66806,7 +74023,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 @@ -66834,7 +74056,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) @@ -66876,7 +74102,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 @@ -66904,7 +74134,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) @@ -66946,7 +74180,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 @@ -66974,7 +74212,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) @@ -67016,7 +74258,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 @@ -67044,7 +74290,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) @@ -67086,7 +74336,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 @@ -67114,7 +74368,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) @@ -67156,7 +74414,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 @@ -67184,7 +74446,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) @@ -67226,7 +74492,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 @@ -67254,7 +74524,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) @@ -67296,7 +74570,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 @@ -67324,7 +74602,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) @@ -67366,7 +74648,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 @@ -67394,7 +74680,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) @@ -67436,7 +74726,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 @@ -67464,7 +74758,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) @@ -67506,7 +74804,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 @@ -67534,7 +74837,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) @@ -67576,7 +74884,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 @@ -67604,7 +74917,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) @@ -67646,7 +74964,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 @@ -67674,7 +74996,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) @@ -67716,7 +75042,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 @@ -67744,7 +75074,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) @@ -67786,7 +75120,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 @@ -67817,7 +75156,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) @@ -67855,7 +75199,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) @@ -67897,7 +75246,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 @@ -67925,7 +75278,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) @@ -67967,7 +75324,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 @@ -67998,7 +75360,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) @@ -68037,7 +75404,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) @@ -68079,7 +75451,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 @@ -68110,7 +75486,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) @@ -68147,7 +75527,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) @@ -68189,7 +75573,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 @@ -68220,7 +75608,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) @@ -68257,7 +75649,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) @@ -68299,7 +75695,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 @@ -68327,7 +75728,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) @@ -68369,7 +75775,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 @@ -68397,7 +75808,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) @@ -68441,7 +75857,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 @@ -68469,7 +75889,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) @@ -68513,7 +75937,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 @@ -68541,7 +75969,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) @@ -68583,7 +76015,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 @@ -68611,7 +76047,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) @@ -68653,7 +76093,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 @@ -68681,7 +76125,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) @@ -68793,7 +76241,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 @@ -68844,7 +76296,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 @@ -68916,7 +76372,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 @@ -68964,7 +76424,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 @@ -69008,7 +76472,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 @@ -69036,7 +76504,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) @@ -69078,7 +76550,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 @@ -69106,7 +76582,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) @@ -69148,7 +76628,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 @@ -69176,7 +76660,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) @@ -69218,7 +76706,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 @@ -69246,7 +76738,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) @@ -69288,7 +76784,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 @@ -69316,7 +76816,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) @@ -69358,7 +76862,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 @@ -69386,7 +76894,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) @@ -69428,7 +76940,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 @@ -69456,7 +76972,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) @@ -69498,7 +77018,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 @@ -69526,7 +77050,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) @@ -69568,7 +77096,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 @@ -69596,7 +77128,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) @@ -69638,7 +77174,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 @@ -69669,7 +77209,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) @@ -69707,7 +77251,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) @@ -69749,7 +77297,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 @@ -69780,7 +77332,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) @@ -69818,7 +77374,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) @@ -69860,7 +77420,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 @@ -69891,7 +77455,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) @@ -69928,7 +77496,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) @@ -69970,7 +77542,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 @@ -70001,7 +77577,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) @@ -70038,7 +77618,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) @@ -70080,7 +77664,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 @@ -70111,7 +77699,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) @@ -70149,7 +77741,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) @@ -70191,7 +77787,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 @@ -70222,7 +77822,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) @@ -70260,7 +77864,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) @@ -70302,7 +77910,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 @@ -70333,7 +77945,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) @@ -70370,7 +77986,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) @@ -70412,7 +78032,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 @@ -70443,7 +78067,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) @@ -70480,7 +78108,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) @@ -70522,7 +78154,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 @@ -70553,7 +78189,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) @@ -70590,7 +78230,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) @@ -70632,7 +78276,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 @@ -70663,7 +78311,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) @@ -70700,7 +78352,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) @@ -70742,7 +78398,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 @@ -70773,7 +78433,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) @@ -70810,7 +78474,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) @@ -70852,7 +78520,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 @@ -70883,7 +78555,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) @@ -70920,7 +78596,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) @@ -70962,7 +78642,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 @@ -70993,7 +78677,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) @@ -71031,7 +78719,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) @@ -71073,7 +78765,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 @@ -71104,7 +78800,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) @@ -71141,7 +78841,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) @@ -71183,7 +78887,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 @@ -71211,7 +78919,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) @@ -71253,7 +78965,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 @@ -71281,7 +78997,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) @@ -71323,7 +79043,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 @@ -71351,7 +79075,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) @@ -71393,7 +79121,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 @@ -71421,7 +79153,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) @@ -71463,7 +79199,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 @@ -71494,7 +79234,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) @@ -71531,7 +79275,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) @@ -71573,7 +79321,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 @@ -71605,7 +79357,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) @@ -71644,7 +79400,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) @@ -71686,7 +79446,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 @@ -71718,7 +79483,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) @@ -71758,7 +79528,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) @@ -71800,7 +79574,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 @@ -71828,7 +79606,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) @@ -71870,7 +79652,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 @@ -71898,7 +79684,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) @@ -71940,7 +79730,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 @@ -71968,7 +79762,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) @@ -72010,7 +79808,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 @@ -72038,7 +79840,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) @@ -72080,7 +79886,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 @@ -72111,7 +79921,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) @@ -72148,7 +79962,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) @@ -72190,7 +80008,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 @@ -72218,7 +80040,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) @@ -72260,7 +80086,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 @@ -72288,7 +80118,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) @@ -72330,7 +80164,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 @@ -72361,7 +80199,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) @@ -72398,7 +80240,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) @@ -72440,7 +80286,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 @@ -72468,7 +80318,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) @@ -72510,7 +80364,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 @@ -72538,7 +80396,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) @@ -72580,7 +80442,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 @@ -72611,7 +80477,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) @@ -72648,7 +80518,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) @@ -72690,7 +80564,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 @@ -72721,7 +80599,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) @@ -72758,7 +80640,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) @@ -72800,7 +80686,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 @@ -72831,7 +80721,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) @@ -72868,7 +80762,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) @@ -72910,7 +80808,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 @@ -72941,7 +80843,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) @@ -72978,7 +80884,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) @@ -73020,7 +80930,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 @@ -73051,7 +80965,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) @@ -73088,7 +81006,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) @@ -73130,7 +81052,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 @@ -73161,7 +81087,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) @@ -73198,7 +81128,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) @@ -73240,7 +81174,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 @@ -73271,7 +81209,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) @@ -73308,7 +81250,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) @@ -73350,7 +81296,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 @@ -73378,7 +81328,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) @@ -73420,7 +81374,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 @@ -73451,7 +81409,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) @@ -73488,7 +81450,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) @@ -73530,7 +81496,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 @@ -73558,7 +81528,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) @@ -73600,7 +81574,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 @@ -73628,7 +81606,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) @@ -73672,7 +81654,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 @@ -73700,7 +81686,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) @@ -73744,7 +81734,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 @@ -73772,7 +81766,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) @@ -73814,7 +81812,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 @@ -73842,7 +81844,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) @@ -73884,7 +81890,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 @@ -73912,7 +81922,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) @@ -73986,7 +82000,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 @@ -74044,7 +82062,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 @@ -74075,7 +82097,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) @@ -74112,7 +82138,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) @@ -74154,7 +82184,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 @@ -74185,7 +82219,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) @@ -74222,7 +82260,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) @@ -74264,7 +82306,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 @@ -74295,7 +82341,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) @@ -74332,7 +82382,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) @@ -74374,7 +82428,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 @@ -74402,7 +82460,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) @@ -74444,7 +82506,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 @@ -74472,7 +82538,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) @@ -74514,7 +82584,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 @@ -74545,7 +82619,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) @@ -74582,7 +82660,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) @@ -74624,7 +82706,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 @@ -74652,7 +82738,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) @@ -74694,7 +82784,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 @@ -74722,7 +82816,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) @@ -74764,7 +82862,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 @@ -74795,7 +82897,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) @@ -74832,7 +82938,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) @@ -74874,7 +82984,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 @@ -74902,7 +83016,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) @@ -74944,7 +83062,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 @@ -74975,7 +83097,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) @@ -75012,7 +83138,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) @@ -75056,7 +83186,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 @@ -75087,7 +83221,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) @@ -75124,7 +83262,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) @@ -75168,7 +83310,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 @@ -75196,7 +83342,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) @@ -75238,7 +83388,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 @@ -75266,7 +83420,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) @@ -75310,7 +83468,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 @@ -75338,7 +83500,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) @@ -75382,7 +83548,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 @@ -75410,7 +83580,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) @@ -75452,7 +83626,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 @@ -75480,7 +83658,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) @@ -75522,7 +83704,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 @@ -75550,7 +83736,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) @@ -75611,7 +83801,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 @@ -75642,7 +83837,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) @@ -75681,7 +83881,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) @@ -75723,7 +83928,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 @@ -75754,7 +83964,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) @@ -75792,7 +84007,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) @@ -75834,7 +84054,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 @@ -75865,7 +84090,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) @@ -75904,7 +84134,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) @@ -75946,7 +84181,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 @@ -75974,7 +84214,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) @@ -76016,7 +84261,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 @@ -76044,7 +84294,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) @@ -76088,7 +84343,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 @@ -76116,7 +84376,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) @@ -76160,7 +84425,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 @@ -76188,7 +84458,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) @@ -76230,7 +84505,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 @@ -76258,7 +84538,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) @@ -76300,7 +84585,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 @@ -76328,7 +84618,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) @@ -76461,7 +84756,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 @@ -76514,7 +84813,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 @@ -76567,7 +84870,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 @@ -76620,7 +84927,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 @@ -76672,7 +84983,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 @@ -76725,7 +85040,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 @@ -76779,7 +85098,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 @@ -76833,7 +85156,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 @@ -76886,7 +85213,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 @@ -76939,7 +85270,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 @@ -76992,7 +85327,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 @@ -77045,7 +85384,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 @@ -77098,7 +85441,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 @@ -77151,7 +85498,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 @@ -77205,7 +85556,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 @@ -77261,7 +85616,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 @@ -77314,7 +85673,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 @@ -77366,7 +85729,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 @@ -77423,7 +85790,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 @@ -77475,7 +85846,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 @@ -77503,7 +85878,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) @@ -77545,7 +85924,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 @@ -77573,7 +85956,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) @@ -77615,7 +86002,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 @@ -77643,7 +86034,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) @@ -77685,7 +86080,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 @@ -77713,7 +86112,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) @@ -77755,7 +86158,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 @@ -77783,7 +86190,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) @@ -77825,7 +86236,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 @@ -77853,7 +86268,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) @@ -77895,7 +86314,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 @@ -77923,7 +86346,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) @@ -77965,7 +86392,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 @@ -77993,7 +86424,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) @@ -78035,7 +86470,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 @@ -78063,7 +86502,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) @@ -78105,7 +86548,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 @@ -78136,7 +86583,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) @@ -78173,7 +86624,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) @@ -78215,7 +86670,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 @@ -78243,7 +86702,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) @@ -78285,7 +86748,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 @@ -78313,7 +86780,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) @@ -78355,7 +86826,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 @@ -78383,7 +86858,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) @@ -78425,7 +86904,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 @@ -78453,7 +86936,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) @@ -78495,7 +86982,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 @@ -78523,7 +87014,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) @@ -78565,7 +87060,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 @@ -78593,7 +87092,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) @@ -78635,7 +87138,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 @@ -78663,7 +87170,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) @@ -78705,7 +87216,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 @@ -78733,7 +87248,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) @@ -78775,7 +87294,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 @@ -78803,7 +87326,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) @@ -78845,7 +87372,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 @@ -78873,7 +87404,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) @@ -78915,7 +87450,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 @@ -78943,7 +87482,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) @@ -78985,7 +87528,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 @@ -79013,7 +87560,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) @@ -79055,7 +87606,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 @@ -79083,7 +87638,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) @@ -79125,7 +87684,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 @@ -79153,7 +87716,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) @@ -79195,7 +87762,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 @@ -79223,7 +87794,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) @@ -79265,7 +87840,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 @@ -79293,7 +87872,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) @@ -79335,7 +87918,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 @@ -79363,7 +87950,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) @@ -79405,7 +87996,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 @@ -79433,7 +88028,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) @@ -79475,7 +88074,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 @@ -79503,7 +88106,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) @@ -79545,7 +88152,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 @@ -79576,7 +88187,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) @@ -79613,7 +88228,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) @@ -79655,7 +88274,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 @@ -79686,7 +88309,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) @@ -79723,7 +88350,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) @@ -79765,7 +88396,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 @@ -79796,7 +88431,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) @@ -79833,7 +88472,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) @@ -79875,7 +88518,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 @@ -79906,7 +88553,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) @@ -79943,7 +88594,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) @@ -79985,7 +88640,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 @@ -80016,7 +88675,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) @@ -80053,7 +88716,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) @@ -80095,7 +88762,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 @@ -80126,7 +88797,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) @@ -80163,7 +88838,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) @@ -80205,7 +88884,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 @@ -80236,7 +88919,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) @@ -80273,7 +88960,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) @@ -80315,7 +89006,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 @@ -80346,7 +89041,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) @@ -80383,7 +89082,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) @@ -80425,7 +89128,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 @@ -80456,7 +89163,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) @@ -80493,7 +89204,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) @@ -80535,7 +89250,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 @@ -80566,7 +89285,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) @@ -80603,7 +89326,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) @@ -80645,7 +89372,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 @@ -80676,7 +89407,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) @@ -80713,7 +89448,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) @@ -80755,7 +89494,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 @@ -80783,7 +89526,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) @@ -80825,7 +89572,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 @@ -80853,7 +89604,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) @@ -80895,7 +89650,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 @@ -80923,7 +89682,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) @@ -80965,7 +89728,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 @@ -80993,7 +89760,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) @@ -81035,7 +89806,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 @@ -81063,7 +89838,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) @@ -81105,7 +89884,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 @@ -81133,7 +89916,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) @@ -81175,7 +89962,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 @@ -81203,7 +89994,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) @@ -81245,7 +90040,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 @@ -81273,7 +90072,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) @@ -81315,7 +90118,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 @@ -81343,7 +90150,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) @@ -81385,7 +90196,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 @@ -81413,7 +90228,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) @@ -81455,7 +90274,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 @@ -81484,7 +90308,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) @@ -81526,7 +90354,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 @@ -81557,7 +90389,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) @@ -81596,7 +90432,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) @@ -81638,7 +90478,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 @@ -81666,7 +90510,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) @@ -81708,7 +90556,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 @@ -81736,7 +90588,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) @@ -81780,7 +90636,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 @@ -81808,7 +90668,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) @@ -81852,7 +90716,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 @@ -81880,7 +90748,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) @@ -81922,7 +90794,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 @@ -81950,7 +90826,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) @@ -81992,7 +90872,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 @@ -82020,7 +90904,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) @@ -82092,7 +90980,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 @@ -82120,7 +91012,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) @@ -82162,7 +91058,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 @@ -82190,7 +91090,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) @@ -82232,7 +91136,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 @@ -82260,7 +91168,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) @@ -82302,7 +91214,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 @@ -82333,7 +91249,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) @@ -82370,7 +91290,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) @@ -82412,7 +91336,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 @@ -82443,7 +91371,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) @@ -82480,7 +91412,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) @@ -82522,7 +91458,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 @@ -82553,7 +91493,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) @@ -82591,7 +91535,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) @@ -82633,7 +91581,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 @@ -82664,7 +91617,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) @@ -82702,7 +91660,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) @@ -82744,7 +91706,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 @@ -82772,7 +91738,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) @@ -82814,7 +91784,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 @@ -82845,7 +91819,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) @@ -82884,7 +91862,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) @@ -82926,7 +91908,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 @@ -82957,7 +91943,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) @@ -82996,7 +91986,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) @@ -83038,7 +92032,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 @@ -83069,7 +92067,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) @@ -83106,7 +92108,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) @@ -83148,7 +92154,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 @@ -83179,7 +92189,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) @@ -83216,7 +92230,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) @@ -83258,7 +92276,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 @@ -83289,7 +92311,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) @@ -83326,7 +92352,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) @@ -83368,7 +92398,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 @@ -83399,7 +92433,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) @@ -83437,7 +92475,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) @@ -83479,7 +92521,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 @@ -83507,7 +92553,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) @@ -83549,7 +92599,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 @@ -83577,7 +92631,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) @@ -83621,7 +92679,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 @@ -83649,7 +92711,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) @@ -83693,7 +92759,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 @@ -83721,7 +92791,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) @@ -83763,7 +92837,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 @@ -83791,7 +92869,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) @@ -83833,7 +92915,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 @@ -83861,7 +92947,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) @@ -83924,7 +93014,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 @@ -83952,7 +93046,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) @@ -83994,7 +93092,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 @@ -84022,7 +93124,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) @@ -84064,7 +93170,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 @@ -84092,7 +93202,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) @@ -84134,7 +93248,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 @@ -84162,7 +93280,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) @@ -84204,7 +93326,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 @@ -84232,7 +93358,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) @@ -84274,7 +93404,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 @@ -84302,7 +93436,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) @@ -84344,7 +93482,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 @@ -84372,7 +93514,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) @@ -84416,7 +93562,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 @@ -84444,7 +93594,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) @@ -84488,7 +93642,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 @@ -84516,7 +93674,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) @@ -84558,7 +93720,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 @@ -84586,7 +93752,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) @@ -84628,7 +93798,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 @@ -84656,7 +93830,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) @@ -84718,7 +93896,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 @@ -84746,7 +93928,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) @@ -84788,7 +93974,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 @@ -84816,7 +94006,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) @@ -84858,7 +94052,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 @@ -84886,7 +94084,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) @@ -84928,7 +94130,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 @@ -84956,7 +94162,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) @@ -84998,7 +94208,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 @@ -85026,7 +94240,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) @@ -85068,7 +94286,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 @@ -85096,7 +94318,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) @@ -85140,7 +94366,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 @@ -85168,7 +94398,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) @@ -85212,7 +94446,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 @@ -85240,7 +94478,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) @@ -85282,7 +94524,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 @@ -85310,7 +94556,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) @@ -85352,7 +94602,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 @@ -85380,7 +94634,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) @@ -85447,7 +94705,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 @@ -85475,7 +94737,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) @@ -85517,7 +94783,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 @@ -85545,7 +94815,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) @@ -85587,7 +94861,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 @@ -85615,7 +94893,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) @@ -85657,7 +94939,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 @@ -85685,7 +94971,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) @@ -85727,7 +95017,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 @@ -85755,7 +95049,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) @@ -85797,7 +95095,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 @@ -85825,7 +95127,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) @@ -85867,7 +95173,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 @@ -85895,7 +95205,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) @@ -85937,7 +95251,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 @@ -85965,7 +95283,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) @@ -86007,7 +95329,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 @@ -86035,7 +95361,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) @@ -86077,7 +95407,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 @@ -86105,7 +95439,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) @@ -86147,7 +95485,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 @@ -86175,7 +95517,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) @@ -86219,7 +95565,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 @@ -86247,7 +95597,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) @@ -86291,7 +95645,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 @@ -86319,7 +95677,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) @@ -86361,7 +95723,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 @@ -86389,7 +95755,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) @@ -86431,7 +95801,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 @@ -86459,7 +95833,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) @@ -86521,7 +95899,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 @@ -86549,7 +95931,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) @@ -86591,7 +95977,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 @@ -86619,7 +96009,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) @@ -86661,7 +96055,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 @@ -86689,7 +96087,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) @@ -86731,7 +96133,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 @@ -86759,7 +96165,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) @@ -86801,7 +96211,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 @@ -86829,7 +96243,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) @@ -86871,7 +96289,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 @@ -86899,7 +96321,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) @@ -86943,7 +96369,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 @@ -86971,7 +96401,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) @@ -87015,7 +96449,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 @@ -87043,7 +96481,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) @@ -87085,7 +96527,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 @@ -87113,7 +96559,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) @@ -87155,7 +96605,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 @@ -87183,7 +96637,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) @@ -87245,7 +96703,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 @@ -87273,7 +96735,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) @@ -87315,7 +96781,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 @@ -87343,7 +96814,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) @@ -87385,7 +96860,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 @@ -87413,7 +96893,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) @@ -87455,7 +96939,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 @@ -87483,7 +96971,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) @@ -87525,7 +97017,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 @@ -87553,7 +97050,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) @@ -87595,7 +97097,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 @@ -87623,7 +97130,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) @@ -87667,7 +97179,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 @@ -87695,7 +97211,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) @@ -87739,7 +97259,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 @@ -87767,7 +97291,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) @@ -87809,7 +97337,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 @@ -87837,7 +97369,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) @@ -87879,7 +97415,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 @@ -87907,7 +97447,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) @@ -87977,7 +97521,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 @@ -88005,7 +97553,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) @@ -88047,7 +97599,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 @@ -88075,7 +97631,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) @@ -88117,7 +97677,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 @@ -88145,7 +97709,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) @@ -88187,7 +97755,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 @@ -88218,7 +97791,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) @@ -88257,7 +97835,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) @@ -88299,7 +97881,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 @@ -88330,7 +97917,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) @@ -88369,7 +97961,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) @@ -88411,7 +98007,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 @@ -88443,7 +98044,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) @@ -88482,7 +98088,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) @@ -88524,7 +98135,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 @@ -88556,7 +98172,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) @@ -88596,7 +98217,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) @@ -88638,7 +98264,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 @@ -88670,7 +98301,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) @@ -88710,7 +98346,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) @@ -88752,7 +98393,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 @@ -88784,7 +98430,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) @@ -88825,7 +98476,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) @@ -88867,7 +98523,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 @@ -88899,7 +98560,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) @@ -88940,7 +98606,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) @@ -88982,7 +98653,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 @@ -89014,7 +98690,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) @@ -89055,7 +98736,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) @@ -89097,7 +98783,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 @@ -89129,7 +98820,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) @@ -89169,7 +98865,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) @@ -89211,7 +98912,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 @@ -89239,7 +98944,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) @@ -89281,7 +98990,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 @@ -89309,7 +99022,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) @@ -89353,7 +99070,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 @@ -89381,7 +99102,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) @@ -89425,7 +99150,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 @@ -89453,7 +99182,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) @@ -89495,7 +99228,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 @@ -89523,7 +99260,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) @@ -89565,7 +99306,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 @@ -89593,7 +99338,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) @@ -89665,7 +99414,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 @@ -89693,7 +99447,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) @@ -89738,7 +99497,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 @@ -89766,7 +99530,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) @@ -89811,7 +99580,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 @@ -89839,7 +99613,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) @@ -89884,7 +99663,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 @@ -89912,7 +99696,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) @@ -89957,7 +99746,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 @@ -89985,7 +99779,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) @@ -90030,7 +99829,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 @@ -90058,7 +99862,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) @@ -90103,7 +99912,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 @@ -90131,7 +99945,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) @@ -90176,7 +99995,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 @@ -90204,7 +100028,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) @@ -90249,7 +100078,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 @@ -90277,7 +100111,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) @@ -90322,7 +100161,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 @@ -90350,7 +100194,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) @@ -90395,7 +100244,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 @@ -90423,7 +100277,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) @@ -90468,7 +100327,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 @@ -90496,7 +100360,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) @@ -90541,7 +100410,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 @@ -90569,7 +100443,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) @@ -90614,7 +100493,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 @@ -90642,7 +100526,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) @@ -90687,7 +100576,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 @@ -90715,7 +100609,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) @@ -90760,7 +100659,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 @@ -90788,7 +100692,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) @@ -90833,7 +100742,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 @@ -90861,7 +100775,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) @@ -90935,7 +100854,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 @@ -90963,7 +100887,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) @@ -91008,7 +100937,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 @@ -91036,7 +100970,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) @@ -91081,7 +101020,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 @@ -91109,7 +101053,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) @@ -91154,7 +101103,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 @@ -91182,7 +101136,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) @@ -91227,7 +101186,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 @@ -91255,7 +101219,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) @@ -91300,7 +101269,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 @@ -91328,7 +101302,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) @@ -91373,7 +101352,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 @@ -91401,7 +101385,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) @@ -91446,7 +101435,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 @@ -91474,7 +101468,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) @@ -91519,7 +101518,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 @@ -91547,7 +101551,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) @@ -91592,7 +101601,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 @@ -91620,7 +101634,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) @@ -91665,7 +101684,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 @@ -91693,7 +101717,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) @@ -91738,7 +101767,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 @@ -91766,7 +101800,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) @@ -91811,7 +101850,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 @@ -91839,7 +101883,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) @@ -91884,7 +101933,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 @@ -91912,7 +101966,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) @@ -91957,7 +102016,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 @@ -91985,7 +102049,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) @@ -92030,7 +102099,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 @@ -92058,7 +102132,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) @@ -92103,7 +102182,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 @@ -92131,7 +102215,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) @@ -92205,7 +102294,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 @@ -92233,7 +102327,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) @@ -92278,7 +102377,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 @@ -92306,7 +102410,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) @@ -92351,7 +102460,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 @@ -92379,7 +102493,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) @@ -92424,7 +102543,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 @@ -92452,7 +102576,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) @@ -92497,7 +102626,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 @@ -92525,7 +102659,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) @@ -92570,7 +102709,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 @@ -92598,7 +102742,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) @@ -92643,7 +102792,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 @@ -92671,7 +102825,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) @@ -92716,7 +102875,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 @@ -92744,7 +102908,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) @@ -92789,7 +102958,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 @@ -92817,7 +102991,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) @@ -92862,7 +103041,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 @@ -92890,7 +103074,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) @@ -92935,7 +103124,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 @@ -92963,7 +103157,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) @@ -93008,7 +103207,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 @@ -93036,7 +103240,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) @@ -93081,7 +103290,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 @@ -93109,7 +103323,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) @@ -93154,7 +103373,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 @@ -93182,7 +103406,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) @@ -93227,7 +103456,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 @@ -93255,7 +103489,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) @@ -93300,7 +103539,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 @@ -93328,7 +103572,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) @@ -93373,7 +103622,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 @@ -93401,7 +103655,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) @@ -93475,7 +103734,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 @@ -93503,7 +103766,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) @@ -93548,7 +103815,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 @@ -93576,7 +103848,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) @@ -93621,7 +103898,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 @@ -93649,7 +103931,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) @@ -93694,7 +103981,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 @@ -93722,7 +104014,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) @@ -93767,7 +104064,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 @@ -93795,7 +104097,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) @@ -93840,7 +104147,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 @@ -93868,7 +104180,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) @@ -93913,7 +104230,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 @@ -93941,7 +104263,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) @@ -93986,7 +104313,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 @@ -94014,7 +104345,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) @@ -94059,7 +104394,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 @@ -94087,7 +104427,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) @@ -94132,7 +104476,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 @@ -94160,7 +104509,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) @@ -94205,7 +104559,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 @@ -94233,7 +104591,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) @@ -94278,7 +104640,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 @@ -94306,7 +104673,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) @@ -94351,7 +104723,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 @@ -94379,7 +104756,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) @@ -94424,7 +104806,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 @@ -94452,7 +104838,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) @@ -94497,7 +104887,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 @@ -94525,7 +104919,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) @@ -94570,7 +104968,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 @@ -94598,7 +105000,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) @@ -94643,7 +105049,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 @@ -94671,7 +105082,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) @@ -94745,7 +105160,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 @@ -94773,7 +105192,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) @@ -94818,7 +105241,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 @@ -94846,7 +105274,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) @@ -94891,7 +105323,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 @@ -94919,7 +105356,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) @@ -94964,7 +105405,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 @@ -94992,7 +105438,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) @@ -95037,7 +105488,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 @@ -95065,7 +105521,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) @@ -95110,7 +105571,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 @@ -95138,7 +105604,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) @@ -95183,7 +105654,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 @@ -95211,7 +105687,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) @@ -95256,7 +105737,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 @@ -95284,7 +105769,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) @@ -95329,7 +105818,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 @@ -95357,7 +105851,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) @@ -95402,7 +105900,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 @@ -95430,7 +105933,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) @@ -95475,7 +105983,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 @@ -95503,7 +106015,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) @@ -95548,7 +106064,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 @@ -95576,7 +106097,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) @@ -95621,7 +106147,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 @@ -95649,7 +106180,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) @@ -95694,7 +106230,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 @@ -95722,7 +106262,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) @@ -95767,7 +106311,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 @@ -95795,7 +106343,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) @@ -95840,7 +106392,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 @@ -95868,7 +106424,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) @@ -95913,7 +106473,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 @@ -95941,7 +106506,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) @@ -96015,7 +106584,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 @@ -96043,7 +106617,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) @@ -96088,7 +106667,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 @@ -96116,7 +106700,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) @@ -96161,7 +106750,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 @@ -96189,7 +106783,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) @@ -96234,7 +106833,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 @@ -96262,7 +106866,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) @@ -96307,7 +106916,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 @@ -96335,7 +106949,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) @@ -96380,7 +106999,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 @@ -96408,7 +107032,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) @@ -96453,7 +107082,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 @@ -96481,7 +107115,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) @@ -96526,7 +107165,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 @@ -96554,7 +107198,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) @@ -96599,7 +107248,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 @@ -96627,7 +107281,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) @@ -96672,7 +107331,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 @@ -96700,7 +107364,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) @@ -96745,7 +107414,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 @@ -96773,7 +107447,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) @@ -96818,7 +107497,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 @@ -96846,7 +107530,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) @@ -96891,7 +107580,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 @@ -96919,7 +107613,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) @@ -96964,7 +107663,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 @@ -96992,7 +107696,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) @@ -97037,7 +107746,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 @@ -97065,7 +107779,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) @@ -97110,7 +107829,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 @@ -97138,7 +107862,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) @@ -97183,7 +107912,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 @@ -97211,7 +107945,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) @@ -97285,7 +108024,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 @@ -97313,7 +108056,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) @@ -97358,7 +108105,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 @@ -97386,7 +108138,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) @@ -97431,7 +108187,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 @@ -97459,7 +108220,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) @@ -97504,7 +108269,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 @@ -97532,7 +108302,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) @@ -97577,7 +108351,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 @@ -97605,7 +108384,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) @@ -97650,7 +108434,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 @@ -97678,7 +108467,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) @@ -97723,7 +108517,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 @@ -97751,7 +108550,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) @@ -97796,7 +108600,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 @@ -97824,7 +108632,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) @@ -97869,7 +108681,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 @@ -97897,7 +108713,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) @@ -97942,7 +108762,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 @@ -97970,7 +108795,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) @@ -98015,7 +108844,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 @@ -98043,7 +108876,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) @@ -98088,7 +108925,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 @@ -98116,7 +108958,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) @@ -98161,7 +109008,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 @@ -98189,7 +109041,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) @@ -98234,7 +109091,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 @@ -98262,7 +109123,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) @@ -98307,7 +109172,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 @@ -98335,7 +109204,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) @@ -98380,7 +109253,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 @@ -98408,7 +109285,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) @@ -98453,7 +109334,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 @@ -98481,7 +109366,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) @@ -98555,7 +109444,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 @@ -98583,7 +109476,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) @@ -98628,7 +109525,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 @@ -98656,7 +109558,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) @@ -98701,7 +109607,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 @@ -98729,7 +109640,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) @@ -98774,7 +109689,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 @@ -98802,7 +109722,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) @@ -98847,7 +109772,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 @@ -98875,7 +109805,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) @@ -98920,7 +109855,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 @@ -98948,7 +109888,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) @@ -98993,7 +109938,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 @@ -99021,7 +109971,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) @@ -99066,7 +110021,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 @@ -99094,7 +110053,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) @@ -99139,7 +110102,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 @@ -99167,7 +110135,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) @@ -99212,7 +110184,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 @@ -99240,7 +110217,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) @@ -99285,7 +110267,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 @@ -99313,7 +110299,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) @@ -99358,7 +110348,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 @@ -99386,7 +110381,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) @@ -99431,7 +110431,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 @@ -99459,7 +110464,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) @@ -99504,7 +110514,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 @@ -99532,7 +110546,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) @@ -99577,7 +110595,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 @@ -99605,7 +110627,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) @@ -99650,7 +110676,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 @@ -99678,7 +110708,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) @@ -99723,7 +110757,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 @@ -99751,7 +110790,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) @@ -99825,7 +110868,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 = @@ -99854,7 +110902,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 @@ -99900,7 +110953,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 = @@ -99929,7 +110987,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 @@ -99975,7 +111038,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 = @@ -100004,7 +111072,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 @@ -100050,7 +111123,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 = @@ -100079,7 +111157,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 @@ -100125,7 +111208,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 = @@ -100155,7 +111243,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 @@ -100202,7 +111295,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 = @@ -100231,7 +111329,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 @@ -100278,7 +111381,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 = @@ -100309,7 +111417,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 @@ -100356,7 +111469,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 = @@ -100385,7 +111503,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 @@ -100431,7 +111554,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 = @@ -100460,7 +111588,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 @@ -100506,7 +111639,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 = @@ -100535,7 +111673,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 @@ -100581,7 +111724,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 = @@ -100610,7 +111758,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 @@ -100656,7 +111809,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 = @@ -100685,7 +111843,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 @@ -100732,7 +111895,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 = @@ -100761,7 +111929,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 @@ -100808,7 +111981,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 = @@ -100837,7 +112015,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 @@ -100883,7 +112066,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 = @@ -100912,7 +112100,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 @@ -100958,7 +112151,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 = @@ -100987,7 +112185,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 @@ -101033,7 +112236,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 = @@ -101062,7 +112270,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 @@ -101137,7 +112350,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 @@ -101165,7 +112382,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) @@ -101210,7 +112431,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 @@ -101238,7 +112464,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) @@ -101283,7 +112514,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 @@ -101311,7 +112547,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) @@ -101356,7 +112597,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 @@ -101384,7 +112630,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) @@ -101429,7 +112680,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 @@ -101457,7 +112713,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) @@ -101502,7 +112763,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 @@ -101530,7 +112796,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) @@ -101575,7 +112846,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 @@ -101603,7 +112879,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) @@ -101648,7 +112929,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 @@ -101676,7 +112961,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) @@ -101721,7 +113010,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 @@ -101749,7 +113043,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) @@ -101794,7 +113092,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 @@ -101822,7 +113125,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) @@ -101867,7 +113175,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 @@ -101895,7 +113207,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) @@ -101940,7 +113256,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 @@ -101968,7 +113289,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) @@ -102013,7 +113339,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 @@ -102041,7 +113372,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) @@ -102086,7 +113422,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 @@ -102114,7 +113454,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) @@ -102159,7 +113503,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 @@ -102187,7 +113535,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) @@ -102232,7 +113584,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 @@ -102260,7 +113616,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) @@ -102305,7 +113665,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 @@ -102333,7 +113698,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) @@ -102394,7 +113763,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 @@ -102422,7 +113795,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) @@ -102464,7 +113841,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 @@ -102492,7 +113873,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) @@ -102534,7 +113919,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 @@ -102562,7 +113951,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) @@ -102606,7 +113999,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 @@ -102634,7 +114031,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) @@ -102678,7 +114079,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 @@ -102706,7 +114111,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) @@ -102748,7 +114157,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 @@ -102776,7 +114189,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) @@ -102818,7 +114235,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 @@ -102846,7 +114267,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) @@ -102910,7 +114335,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]; @@ -102959,7 +114388,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]; @@ -103004,7 +114437,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]; @@ -103048,7 +114485,11 @@ 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]; @@ -103074,7 +114515,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)]; @@ -103114,7 +114559,11 @@ 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]; @@ -103141,7 +114590,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)]; @@ -103181,7 +114634,11 @@ 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]; @@ -103208,7 +114665,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)]; @@ -103248,7 +114709,11 @@ 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]; @@ -103274,7 +114739,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)]; @@ -103314,7 +114783,11 @@ 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]; @@ -103340,7 +114813,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)]; @@ -103382,7 +114859,11 @@ 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]; @@ -103408,7 +114889,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)]; @@ -103450,7 +114935,11 @@ 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]; @@ -103476,7 +114965,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)]; @@ -103516,7 +115009,11 @@ 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]; @@ -103542,7 +115039,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)]; @@ -103582,7 +115083,11 @@ 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]; @@ -103608,7 +115113,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)]; @@ -103668,7 +115177,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 @@ -103723,7 +115236,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 @@ -103751,7 +115268,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) @@ -103793,7 +115314,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 @@ -103821,7 +115346,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) @@ -103863,7 +115392,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 @@ -103891,7 +115424,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) @@ -103933,7 +115470,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 @@ -103961,7 +115502,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) @@ -104005,7 +115550,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 @@ -104033,7 +115582,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) @@ -104077,7 +115630,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 @@ -104105,7 +115662,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) @@ -104147,7 +115708,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 @@ -104175,7 +115740,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) @@ -104217,7 +115786,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 @@ -104245,7 +115818,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) @@ -104320,7 +115897,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 @@ -104364,7 +115945,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 @@ -104409,7 +115994,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 @@ -104453,7 +116042,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 @@ -104498,7 +116091,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 @@ -104543,7 +116140,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 @@ -104587,7 +116188,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 @@ -104632,7 +116237,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 @@ -104678,7 +116287,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 @@ -104726,7 +116339,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 @@ -104774,7 +116391,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 @@ -104821,7 +116442,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 @@ -104849,7 +116474,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) @@ -104891,7 +116520,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 @@ -104919,7 +116552,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) @@ -104961,7 +116598,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 @@ -104989,7 +116630,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) @@ -105031,7 +116676,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 @@ -105060,7 +116709,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) @@ -105102,7 +116755,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 @@ -105130,7 +116787,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) @@ -105172,7 +116833,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 @@ -105200,7 +116865,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) @@ -105242,7 +116911,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 @@ -105270,7 +116943,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) @@ -105312,7 +116989,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 @@ -105340,7 +117021,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) @@ -105382,7 +117067,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 @@ -105410,7 +117099,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) @@ -105454,7 +117147,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 @@ -105482,7 +117179,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) @@ -105526,7 +117227,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 @@ -105554,7 +117259,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) @@ -105596,7 +117305,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 @@ -105624,7 +117337,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) @@ -105666,7 +117383,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 @@ -105694,7 +117415,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) @@ -105758,7 +117483,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 @@ -105803,7 +117532,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 @@ -105846,7 +117579,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 @@ -105891,7 +117628,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 @@ -105940,7 +117681,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 @@ -105968,7 +117713,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) @@ -106010,7 +117759,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 @@ -106038,7 +117791,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) @@ -106080,7 +117837,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 @@ -106108,7 +117869,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) @@ -106150,7 +117915,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 @@ -106178,7 +117947,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) @@ -106222,7 +117995,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 @@ -106250,7 +118027,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) @@ -106294,7 +118075,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 @@ -106322,7 +118107,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) @@ -106364,7 +118153,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 @@ -106392,7 +118185,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) @@ -106434,7 +118231,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 @@ -106462,7 +118263,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) @@ -106520,7 +118325,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]; @@ -106562,7 +118371,11 @@ 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]; @@ -106588,7 +118401,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)]; @@ -106628,7 +118445,11 @@ 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]; @@ -106654,7 +118475,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)]; @@ -106696,7 +118521,11 @@ 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]; @@ -106722,7 +118551,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)]; @@ -106764,7 +118597,11 @@ 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]; @@ -106790,7 +118627,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)]; @@ -106830,7 +118671,11 @@ 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]; @@ -106856,7 +118701,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)]; @@ -106896,7 +118745,11 @@ 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]; @@ -106922,7 +118775,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)]; @@ -106979,7 +118836,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 @@ -107026,7 +118887,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 @@ -107054,7 +118919,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) @@ -107096,7 +118965,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 @@ -107124,7 +118997,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) @@ -107168,7 +119045,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 @@ -107196,7 +119077,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) @@ -107240,7 +119125,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 @@ -107268,7 +119157,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) @@ -107310,7 +119203,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 @@ -107338,7 +119235,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) @@ -107380,7 +119281,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 @@ -107408,7 +119313,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) @@ -107473,7 +119382,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 @@ -107565,7 +119478,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 @@ -107798,7 +119715,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 @@ -107826,7 +119747,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) @@ -107868,7 +119793,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 @@ -107899,7 +119828,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) @@ -107938,7 +119871,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) @@ -107980,7 +119917,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 @@ -108008,7 +119949,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) @@ -108050,7 +119995,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 @@ -108078,7 +120027,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) @@ -108122,7 +120075,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 @@ -108150,7 +120107,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) @@ -108194,7 +120155,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 @@ -108222,7 +120187,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) @@ -108264,7 +120233,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 @@ -108292,7 +120265,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) @@ -108334,7 +120311,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 @@ -108362,7 +120343,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) @@ -108424,7 +120409,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 @@ -108471,7 +120460,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 @@ -108520,7 +120513,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 @@ -108548,7 +120545,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) @@ -108590,7 +120591,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 @@ -108618,7 +120623,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) @@ -108660,7 +120669,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 @@ -108688,7 +120701,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) @@ -108730,7 +120747,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 @@ -108758,7 +120779,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) @@ -108802,7 +120827,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 @@ -108830,7 +120859,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) @@ -108874,7 +120907,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 @@ -108902,7 +120939,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) @@ -108944,7 +120985,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 @@ -108972,7 +121017,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) @@ -109014,7 +121063,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 @@ -109042,7 +121095,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) @@ -109107,7 +121164,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 @@ -109171,7 +121232,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 @@ -109230,7 +121295,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 @@ -109288,7 +121357,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 @@ -109316,7 +121389,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) @@ -109358,7 +121435,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 @@ -109391,7 +121472,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) @@ -109446,7 +121531,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) @@ -109488,7 +121577,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 @@ -109516,7 +121609,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) @@ -109558,7 +121655,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 @@ -109586,7 +121687,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) @@ -109630,7 +121735,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 @@ -109658,7 +121767,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) @@ -109702,7 +121815,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 @@ -109730,7 +121847,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) @@ -109772,7 +121893,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 @@ -109800,7 +121925,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) @@ -109842,7 +121971,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 @@ -109870,7 +122003,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) @@ -109936,7 +122073,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 @@ -109964,7 +122105,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) @@ -110006,7 +122151,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 @@ -110034,7 +122183,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) @@ -110076,7 +122229,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 @@ -110104,7 +122261,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) @@ -110146,7 +122307,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 @@ -110174,7 +122339,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) @@ -110216,7 +122385,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 @@ -110245,7 +122418,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) @@ -110287,7 +122464,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 @@ -110315,7 +122496,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) @@ -110357,7 +122542,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 @@ -110385,7 +122574,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) @@ -110427,7 +122620,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 @@ -110455,7 +122652,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) @@ -110497,7 +122698,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 @@ -110525,7 +122730,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) @@ -110567,7 +122776,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 @@ -110595,7 +122808,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) @@ -110639,7 +122856,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 @@ -110667,7 +122888,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) @@ -110711,7 +122936,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 @@ -110739,7 +122968,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) @@ -110781,7 +123014,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 @@ -110809,7 +123046,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) @@ -110851,7 +123092,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 @@ -110879,7 +123124,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) @@ -110940,7 +123189,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 @@ -110991,7 +123244,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 @@ -111041,7 +123298,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 @@ -111085,7 +123346,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 @@ -111113,7 +123378,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) @@ -111155,7 +123424,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 @@ -111183,7 +123456,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) @@ -111227,7 +123504,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 @@ -111255,7 +123536,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) @@ -111299,7 +123584,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 @@ -111327,7 +123616,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) @@ -111369,7 +123662,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 @@ -111397,7 +123694,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) @@ -111439,7 +123740,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 @@ -111467,7 +123772,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) @@ -111654,7 +123963,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 @@ -111700,7 +124013,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 @@ -111748,7 +124066,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 @@ -111776,7 +124098,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) @@ -111818,7 +124144,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 @@ -111846,7 +124176,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) @@ -111888,7 +124222,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 @@ -111916,7 +124254,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) @@ -111958,7 +124300,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 @@ -111986,7 +124332,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) @@ -112028,7 +124378,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 @@ -112056,7 +124410,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) @@ -112098,7 +124456,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 @@ -112126,7 +124488,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) @@ -112168,7 +124534,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 @@ -112196,7 +124566,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) @@ -112238,7 +124612,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 @@ -112266,7 +124644,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) @@ -112308,7 +124690,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 @@ -112336,7 +124722,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) @@ -112378,7 +124768,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 @@ -112406,7 +124800,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) @@ -112448,7 +124846,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 @@ -112476,7 +124878,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) @@ -112518,7 +124924,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 @@ -112546,7 +124956,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) @@ -112588,7 +125002,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 @@ -112616,7 +125034,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) @@ -112658,7 +125080,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 @@ -112686,7 +125112,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) @@ -112728,7 +125158,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 @@ -112756,7 +125190,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) @@ -112798,7 +125236,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 @@ -112826,7 +125268,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) @@ -112868,7 +125314,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 @@ -112896,7 +125346,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) @@ -112938,7 +125392,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 @@ -112966,7 +125424,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) @@ -113008,7 +125470,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 @@ -113036,7 +125502,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) @@ -113078,7 +125548,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 @@ -113106,7 +125580,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) @@ -113148,7 +125626,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 @@ -113176,7 +125658,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) @@ -113218,7 +125704,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 @@ -113246,7 +125736,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) @@ -113288,7 +125782,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 @@ -113316,7 +125814,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) @@ -113358,7 +125860,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 @@ -113386,7 +125893,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) @@ -113428,7 +125940,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 @@ -113456,7 +125973,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) @@ -113498,7 +126020,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 @@ -113526,7 +126053,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) @@ -113568,7 +126100,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 @@ -113596,7 +126133,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) @@ -113638,7 +126180,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 @@ -113666,7 +126213,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) @@ -113708,7 +126260,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 @@ -113736,7 +126293,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) @@ -113778,7 +126340,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 @@ -113807,7 +126374,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) @@ -113849,7 +126421,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 @@ -113878,7 +126455,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) @@ -113920,7 +126502,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 @@ -113949,7 +126536,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) @@ -113991,7 +126583,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 @@ -114020,7 +126617,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) @@ -114062,7 +126664,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 @@ -114091,7 +126698,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) @@ -114133,7 +126745,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 @@ -114162,7 +126779,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) @@ -114204,7 +126826,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 @@ -114232,7 +126858,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) @@ -114274,7 +126904,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 @@ -114302,7 +126936,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) @@ -114344,7 +126982,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 @@ -114372,7 +127014,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) @@ -114414,7 +127060,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 @@ -114442,7 +127092,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) @@ -114484,7 +127138,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 @@ -114512,7 +127171,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) @@ -114554,7 +127218,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 @@ -114583,7 +127252,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) @@ -114625,7 +127299,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 @@ -114653,7 +127331,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) @@ -114695,7 +127377,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 @@ -114723,7 +127410,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) @@ -114765,7 +127457,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 @@ -114793,7 +127490,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) @@ -114835,7 +127537,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 @@ -114863,7 +127570,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) @@ -114905,7 +127617,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 @@ -114933,7 +127649,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) @@ -114975,7 +127695,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 @@ -115003,7 +127727,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) @@ -115045,7 +127773,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 @@ -115073,7 +127805,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) @@ -115115,7 +127851,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 @@ -115143,7 +127883,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) @@ -115185,7 +127929,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 @@ -115213,7 +127961,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) @@ -115255,7 +128007,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 @@ -115283,7 +128039,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) @@ -115325,7 +128085,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 @@ -115353,7 +128117,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) @@ -115395,7 +128163,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 @@ -115423,7 +128195,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) @@ -115465,7 +128241,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 @@ -115493,7 +128273,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) @@ -115535,7 +128319,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 @@ -115563,7 +128351,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) @@ -115605,7 +128397,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 @@ -115633,7 +128429,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) @@ -115675,7 +128475,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 @@ -115703,7 +128507,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) @@ -115745,7 +128553,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 @@ -115773,7 +128585,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) @@ -115815,7 +128631,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 @@ -115847,7 +128668,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) @@ -115886,7 +128712,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) @@ -115928,7 +128759,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 @@ -115959,7 +128795,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) @@ -115999,7 +128840,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) @@ -116041,7 +128887,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 @@ -116072,7 +128923,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) @@ -116112,7 +128968,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) @@ -116154,7 +129015,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 @@ -116185,7 +129051,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) @@ -116225,7 +129096,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) @@ -116267,7 +129143,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 @@ -116298,7 +129178,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) @@ -116335,7 +129219,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) @@ -116377,7 +129265,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 @@ -116408,7 +129300,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) @@ -116446,7 +129342,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) @@ -116488,7 +129388,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 @@ -116516,7 +129420,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) @@ -116558,7 +129466,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 @@ -116586,7 +129498,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) @@ -116628,7 +129544,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 @@ -116656,7 +129576,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) @@ -116698,7 +129622,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 @@ -116726,7 +129654,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) @@ -116768,7 +129700,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 @@ -116796,7 +129732,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) @@ -116838,7 +129778,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 @@ -116866,7 +129810,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) @@ -116908,7 +129856,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 @@ -116939,7 +129891,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) @@ -116976,7 +129932,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) @@ -117018,7 +129978,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 @@ -117046,7 +130010,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) @@ -117088,7 +130056,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 @@ -117116,7 +130088,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) @@ -117158,7 +130134,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 @@ -117189,7 +130169,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) @@ -117227,7 +130211,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) @@ -117269,7 +130257,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 @@ -117297,7 +130289,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) @@ -117339,7 +130335,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 @@ -117367,7 +130367,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) @@ -117409,7 +130413,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 @@ -117437,7 +130445,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) @@ -117479,7 +130491,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 @@ -117507,7 +130524,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) @@ -117549,7 +130570,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 @@ -117577,7 +130602,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) @@ -117619,7 +130648,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 @@ -117647,7 +130681,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) @@ -117689,7 +130727,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 @@ -117717,7 +130759,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) @@ -117759,7 +130805,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 @@ -117787,7 +130838,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) @@ -117829,7 +130884,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 @@ -117857,7 +130916,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) @@ -117899,7 +130962,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 @@ -117927,7 +130994,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) @@ -117969,7 +131040,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 @@ -117997,7 +131072,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) @@ -118039,7 +131118,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 @@ -118067,7 +131150,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) @@ -118109,7 +131196,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 @@ -118137,7 +131228,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) @@ -118179,7 +131274,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 @@ -118207,7 +131306,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) @@ -118249,7 +131352,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 @@ -118277,7 +131384,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) @@ -118319,7 +131430,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 @@ -118347,7 +131462,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) @@ -118389,7 +131508,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 @@ -118417,7 +131540,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) @@ -118459,7 +131586,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 @@ -118487,7 +131618,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) @@ -118529,7 +131664,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 @@ -118557,7 +131696,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) @@ -118599,7 +131742,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 @@ -118627,7 +131774,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) @@ -118669,7 +131820,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 @@ -118697,7 +131852,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) @@ -118739,7 +131898,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 @@ -118767,7 +131930,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) @@ -118809,7 +131976,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 @@ -118837,7 +132008,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) @@ -118879,7 +132054,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 @@ -118907,7 +132086,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) @@ -118949,7 +132132,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 @@ -118977,7 +132164,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) @@ -119019,7 +132210,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 @@ -119048,7 +132244,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) @@ -119090,7 +132291,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 @@ -119119,7 +132325,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) @@ -119161,7 +132372,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 @@ -119190,7 +132406,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) @@ -119232,7 +132453,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 @@ -119261,7 +132487,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) @@ -119303,7 +132534,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 @@ -119332,7 +132568,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) @@ -119374,7 +132615,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 @@ -119402,7 +132648,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) @@ -119444,7 +132695,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 @@ -119472,7 +132728,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) @@ -119514,7 +132775,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 @@ -119542,7 +132807,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) @@ -119584,7 +132853,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 @@ -119612,7 +132885,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) @@ -119654,7 +132931,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 @@ -119682,7 +132963,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) @@ -119724,7 +133009,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 @@ -119752,7 +133041,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) @@ -119794,7 +133087,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 @@ -119822,7 +133119,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) @@ -119864,7 +133165,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 @@ -119892,7 +133197,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) @@ -119934,7 +133243,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 @@ -119962,7 +133275,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) @@ -120004,7 +133321,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 @@ -120032,7 +133353,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) @@ -120074,7 +133399,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 @@ -120102,7 +133431,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) @@ -120144,7 +133477,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 @@ -120172,7 +133509,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) @@ -120214,7 +133555,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 @@ -120242,7 +133587,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) @@ -120284,7 +133633,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 @@ -120312,7 +133665,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) @@ -120354,7 +133711,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 @@ -120382,7 +133743,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) @@ -120424,7 +133789,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 @@ -120452,7 +133821,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) @@ -120494,7 +133867,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 @@ -120522,7 +133899,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) @@ -120564,7 +133945,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 @@ -120593,7 +133979,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) @@ -120635,7 +134026,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 @@ -120664,7 +134060,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) @@ -120706,7 +134107,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 @@ -120735,7 +134141,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) @@ -120777,7 +134188,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 @@ -120806,7 +134222,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) @@ -120848,7 +134269,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 @@ -120877,7 +134303,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) @@ -120919,7 +134350,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 @@ -120947,7 +134383,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) @@ -120989,7 +134430,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 @@ -121017,7 +134463,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) @@ -121059,7 +134510,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 @@ -121087,7 +134542,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) @@ -121129,7 +134588,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 @@ -121157,7 +134620,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) @@ -121201,7 +134668,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 @@ -121229,7 +134700,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) @@ -121273,7 +134748,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 @@ -121301,7 +134780,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) @@ -121343,7 +134826,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 @@ -121371,7 +134858,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) @@ -121413,7 +134904,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 @@ -121441,7 +134936,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) @@ -121470,7 +134969,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA }; /*----------------------------------------------------------------------------*\ -| Cluster UnitTesting | 0xFFF1FC05| +| Cluster UnitTesting | 0xFFF1FC05 | |------------------------------------------------------------------------------| | Commands: | | | * Test | 0x00 | @@ -121604,7 +135103,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 @@ -121647,7 +135150,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 @@ -121690,7 +135197,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 @@ -121735,7 +135246,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 @@ -121780,7 +135295,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 @@ -121829,7 +135348,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 @@ -121886,7 +135409,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 @@ -122049,7 +135576,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 @@ -122109,7 +135640,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 @@ -122172,7 +135707,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 @@ -122241,7 +135780,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 @@ -122299,7 +135842,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 @@ -122408,7 +135955,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 @@ -122527,7 +136079,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 @@ -122586,7 +136142,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 @@ -122635,7 +136195,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 @@ -122709,7 +136273,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 @@ -122917,7 +136485,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 @@ -122975,7 +136547,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 @@ -123019,7 +136595,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 @@ -123071,7 +136651,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 @@ -123121,7 +136705,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 @@ -123171,7 +136759,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 @@ -123202,7 +136794,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) @@ -123239,7 +136835,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) @@ -123281,7 +136881,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 @@ -123312,7 +136916,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) @@ -123349,7 +136957,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) @@ -123391,7 +137003,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 @@ -123422,7 +137038,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) @@ -123459,7 +137079,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) @@ -123501,7 +137125,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 @@ -123532,7 +137160,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) @@ -123569,7 +137201,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) @@ -123611,7 +137247,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 @@ -123642,7 +137282,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) @@ -123679,7 +137323,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) @@ -123721,7 +137369,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 @@ -123752,7 +137404,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) @@ -123789,7 +137445,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) @@ -123831,7 +137491,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 @@ -123862,7 +137526,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) @@ -123899,7 +137567,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) @@ -123941,7 +137613,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 @@ -123972,7 +137648,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) @@ -124009,7 +137689,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) @@ -124051,7 +137735,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 @@ -124082,7 +137770,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) @@ -124119,7 +137811,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) @@ -124161,7 +137857,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 @@ -124192,7 +137892,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) @@ -124229,7 +137933,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) @@ -124271,7 +137979,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 @@ -124302,7 +138014,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) @@ -124339,7 +138055,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) @@ -124381,7 +138101,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 @@ -124412,7 +138136,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) @@ -124449,7 +138177,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) @@ -124491,7 +138223,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 @@ -124522,7 +138258,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) @@ -124559,7 +138299,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) @@ -124601,7 +138345,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 @@ -124632,7 +138380,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) @@ -124669,7 +138421,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) @@ -124711,7 +138467,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 @@ -124742,7 +138502,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) @@ -124779,7 +138543,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) @@ -124821,7 +138589,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 @@ -124852,7 +138624,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) @@ -124889,7 +138665,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) @@ -124931,7 +138711,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 @@ -124962,7 +138746,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) @@ -124999,7 +138787,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) @@ -125041,7 +138833,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 @@ -125072,7 +138868,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) @@ -125109,7 +138909,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) @@ -125151,7 +138955,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 @@ -125182,7 +138990,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) @@ -125219,7 +139031,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) @@ -125261,7 +139077,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 @@ -125292,7 +139112,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) @@ -125329,7 +139153,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) @@ -125371,7 +139199,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 @@ -125402,7 +139234,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) @@ -125439,7 +139275,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) @@ -125481,7 +139321,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 @@ -125512,7 +139356,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) @@ -125549,7 +139397,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) @@ -125591,7 +139443,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 @@ -125622,7 +139478,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) @@ -125659,7 +139519,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) @@ -125701,7 +139565,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 @@ -125732,7 +139600,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) @@ -125769,7 +139641,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) @@ -125811,7 +139687,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 @@ -125842,7 +139722,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) @@ -125879,7 +139763,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) @@ -125921,7 +139809,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 @@ -125952,7 +139844,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) @@ -125989,7 +139885,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) @@ -126031,7 +139931,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 @@ -126063,7 +139967,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) @@ -126110,7 +140018,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) @@ -126152,7 +140064,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 @@ -126184,7 +140100,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) @@ -126231,7 +140151,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) @@ -126273,7 +140197,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 @@ -126305,7 +140233,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) @@ -126355,7 +140287,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) @@ -126397,7 +140333,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 @@ -126428,7 +140368,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) @@ -126465,7 +140409,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) @@ -126507,7 +140455,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 @@ -126538,7 +140490,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) @@ -126577,7 +140533,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) @@ -126619,7 +140579,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 @@ -126650,7 +140614,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) @@ -126689,7 +140657,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) @@ -126731,7 +140703,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 @@ -126762,7 +140738,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) @@ -126799,7 +140779,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) @@ -126841,7 +140825,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 @@ -126872,7 +140860,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) @@ -126909,7 +140901,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) @@ -126951,7 +140947,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 @@ -126982,7 +140982,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) @@ -127019,7 +141023,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) @@ -127061,7 +141069,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 @@ -127094,7 +141106,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) @@ -127296,7 +141312,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) @@ -127338,7 +141358,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 @@ -127369,7 +141393,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) @@ -127406,7 +141434,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) @@ -127448,7 +141480,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 @@ -127481,7 +141517,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) @@ -127528,7 +141568,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) @@ -127570,7 +141614,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 @@ -127601,7 +141649,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) @@ -127638,7 +141690,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) @@ -127680,7 +141736,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 @@ -127711,7 +141771,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) @@ -127748,7 +141812,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) @@ -127790,7 +141858,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 @@ -127821,7 +141893,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) @@ -127858,7 +141934,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) @@ -127900,7 +141980,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 @@ -127931,7 +142015,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) @@ -127968,7 +142056,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) @@ -128010,7 +142102,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 @@ -128042,7 +142138,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) @@ -128089,7 +142189,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) @@ -128131,7 +142235,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 @@ -128168,7 +142276,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) @@ -128265,7 +142377,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) @@ -128307,7 +142423,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 @@ -128338,7 +142458,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) @@ -128375,7 +142499,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) @@ -128417,7 +142545,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 @@ -128448,7 +142580,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) @@ -128485,7 +142621,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) @@ -128527,7 +142667,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 @@ -128558,7 +142702,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) @@ -128595,7 +142743,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) @@ -128637,7 +142789,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 @@ -128668,7 +142824,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) @@ -128705,7 +142865,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) @@ -128747,7 +142911,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 @@ -128778,7 +142946,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) @@ -128815,7 +142987,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) @@ -128857,7 +143033,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 @@ -128888,7 +143068,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) @@ -128925,7 +143109,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) @@ -128967,7 +143155,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 @@ -128998,7 +143190,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) @@ -129035,7 +143231,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) @@ -129077,7 +143277,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 @@ -129108,7 +143312,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) @@ -129145,7 +143353,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) @@ -129187,7 +143399,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 @@ -129218,7 +143434,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) @@ -129255,7 +143475,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) @@ -129297,7 +143521,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 @@ -129328,7 +143556,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) @@ -129365,7 +143597,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) @@ -129407,7 +143643,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 @@ -129438,7 +143678,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) @@ -129475,7 +143719,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) @@ -129517,7 +143765,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 @@ -129548,7 +143800,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) @@ -129585,7 +143841,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) @@ -129627,7 +143887,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 @@ -129658,7 +143922,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) @@ -129695,7 +143963,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) @@ -129737,7 +144009,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 @@ -129768,7 +144044,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) @@ -129805,7 +144085,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) @@ -129847,7 +144131,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 @@ -129878,7 +144166,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) @@ -129915,7 +144207,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) @@ -129957,7 +144253,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 @@ -129988,7 +144288,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) @@ -130025,7 +144329,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) @@ -130067,7 +144375,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 @@ -130098,7 +144410,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) @@ -130135,7 +144451,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) @@ -130177,7 +144497,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 @@ -130208,7 +144532,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) @@ -130245,7 +144573,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) @@ -130287,7 +144619,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 @@ -130318,7 +144654,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) @@ -130355,7 +144695,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) @@ -130397,7 +144741,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 @@ -130428,7 +144776,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) @@ -130465,7 +144817,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) @@ -130507,7 +144863,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 @@ -130538,7 +144898,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) @@ -130575,7 +144939,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) @@ -130617,7 +144985,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 @@ -130648,7 +145020,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) @@ -130685,7 +145061,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) @@ -130727,7 +145107,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 @@ -130758,7 +145142,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) @@ -130795,7 +145183,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) @@ -130837,7 +145229,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 @@ -130868,7 +145264,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) @@ -130905,7 +145305,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) @@ -130947,7 +145351,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 @@ -130978,7 +145386,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) @@ -131015,7 +145427,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) @@ -131057,7 +145473,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 @@ -131088,7 +145508,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) @@ -131125,7 +145549,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) @@ -131167,7 +145595,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 @@ -131198,7 +145630,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) @@ -131235,7 +145671,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) @@ -131277,7 +145717,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 @@ -131308,7 +145752,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) @@ -131345,7 +145793,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) @@ -131387,7 +145839,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 @@ -131418,7 +145874,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) @@ -131455,7 +145915,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) @@ -131497,7 +145961,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 @@ -131528,7 +145996,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) @@ -131565,7 +146037,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) @@ -131607,7 +146083,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 @@ -131638,7 +146118,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) @@ -131677,7 +146161,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) @@ -131719,7 +146207,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 @@ -131750,7 +146242,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) @@ -131787,7 +146283,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) @@ -131829,7 +146329,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 @@ -131862,7 +146366,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) @@ -131915,7 +146423,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) @@ -131957,7 +146469,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 @@ -131988,7 +146504,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) @@ -132026,7 +146546,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) @@ -132068,7 +146592,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 @@ -132099,7 +146627,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) @@ -132137,7 +146669,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) @@ -132179,7 +146715,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 @@ -132210,7 +146750,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) @@ -132249,7 +146793,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) @@ -132291,7 +146839,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 @@ -132322,7 +146874,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) @@ -132361,7 +146917,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) @@ -132403,7 +146963,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 @@ -132434,7 +146998,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) @@ -132471,7 +147039,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) @@ -132513,7 +147085,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 @@ -132541,7 +147117,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) @@ -132583,7 +147163,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 @@ -132611,7 +147195,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) @@ -132655,7 +147243,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 @@ -132683,7 +147275,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) @@ -132727,7 +147323,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 @@ -132755,7 +147355,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) @@ -132797,7 +147401,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 @@ -132825,7 +147433,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) @@ -132867,7 +147479,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 @@ -132895,7 +147511,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) 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 03e4ef2a816c23..da1a877800b832 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,9 @@ 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_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -191,13 +192,18 @@ 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_RVCCLEANM_3_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"); @@ -2544,66 +2550,20 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { 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")) { - NextTest(); - return; - } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH reads EventList attribute from DUT\n"); + 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 && PICS_EVENT_LIST_ENABLED")) { - 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")) { - 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")) { - 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; } @@ -2643,12 +2603,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. @@ -2662,7 +2616,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; @@ -2805,48 +2759,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; } }; @@ -6431,94 +6389,36 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { err = TestStep3eGivenAIRQUALSF03ExtremelyPoorEnsureFeaturemapHasTheCorrectBitSet_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4: Read the global attribute: AttributeList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_7(); + err = TestStep4ReadTheGlobalAttributeAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4a: Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4: Read the global attribute: AttributeList\n"); if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4aReadTheGlobalAttributeAttributeList_8(); + err = TestStep4ReadTheGlobalAttributeAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 4b: TH reads from the DUT the AttributeList attribute. 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")) { - NextTest(); - return; - } - err = TestStep4bThReadsFromTheDutTheAttributeListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: TH reads EventList attribute from DUT\n"); + 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 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 6b: TH reads from the DUT the AcceptedCommandList attribute. 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_14(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_10(); break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 7b: TH reads from the DUT the GeneratedCommandList attribute. 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")) { - NextTest(); - return; - } - err = TestStep7bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); break; } @@ -6567,18 +6467,6 @@ class Test_TC_AIRQUAL_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; } // Go on to the next test. @@ -6592,7 +6480,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -6731,7 +6619,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_7() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6739,7 +6627,7 @@ class Test_TC_AIRQUAL_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: Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6758,7 +6646,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aReadTheGlobalAttributeAttributeList_8() + CHIP_ERROR TestStep4ReadTheGlobalAttributeAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6766,7 +6654,7 @@ class Test_TC_AIRQUAL_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: Read the global attribute: AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6784,29 +6672,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsFromTheDutTheAttributeListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aReadTheGlobalAttributeAcceptedCommandList_12() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6814,7 +6680,7 @@ class Test_TC_AIRQUAL_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)); @@ -6825,18 +6691,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_14() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6844,7 +6699,7 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6859,17 +6714,6 @@ class Test_TC_AIRQUAL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } }; class Test_TC_AIRQUAL_2_1 : public TestCommandBridge { @@ -7601,90 +7445,36 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { err = TestStep4oThReadsOptionalAttributeUniqueIDInAttributeList_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 4p: 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")) { - NextTest(); - return; - } - err = TestStep4pThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 5a: TH reads optional event(StartUp) in EventList\n"); + 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 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Step 5b: TH reads optional attribute(ShutDown) in EventList\n"); + case 20: + 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 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 5c: TH reads optional attribute(Leave) in EventList\n"); + case 21: + 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; } NextTest(); return; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Step 5d: 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5dThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Step 6a: TH1 reads AcceptedCommandList from DUT\n"); - err = TestStep6aTh1ReadsAcceptedCommandListFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : 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_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Step 7a: TH1 reads GeneratedCommandList from DUT\n"); - err = TestStep7aTh1ReadsGeneratedCommandListFromDut_26(); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_22(); break; - case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 7b: TH1 reads GeneratedCommandList 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 = TestStep7bTh1ReadsGeneratedCommandListFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 7: TH1 reads GeneratedCommandList from DUT\n"); + err = TestStep7Th1ReadsGeneratedCommandListFromDut_23(); break; } @@ -7769,18 +7559,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -7794,7 +7572,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -8224,29 +8002,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4pThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR - TestStep5dThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_23() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep6aTh1ReadsAcceptedCommandListFromDut_24() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8256,7 +8012,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 6a: 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)); @@ -8272,18 +8028,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_25() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aTh1ReadsGeneratedCommandListFromDut_26() + CHIP_ERROR TestStep7Th1ReadsGeneratedCommandListFromDut_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -8293,7 +8038,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: TH1 reads GeneratedCommandList from DUT Error: %@", err); + NSLog(@"Step 7: TH1 reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8308,17 +8053,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bTh1ReadsGeneratedCommandListFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_ACT_1_1 : public TestCommandBridge { @@ -8707,74 +8441,36 @@ class Test_TC_BIND_1_1 : public TestCommandBridge { err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); + 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"); + 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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")) { - 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -8811,9 +8507,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. @@ -8827,7 +8520,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; @@ -8890,7 +8583,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"); @@ -8898,7 +8591,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)); @@ -8917,7 +8610,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"); @@ -8925,7 +8618,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)); @@ -8943,48 +8636,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -9032,10 +8729,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: @@ -9985,11 +9678,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() @@ -27805,11 +27512,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: @@ -28037,74 +27739,20 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCdoconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -28207,18 +27855,6 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -28232,7 +27868,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -28287,11 +27923,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(); }]; @@ -28868,29 +28499,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28900,7 +28509,7 @@ class Test_TC_CDOCONC_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)); @@ -28916,18 +28525,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -28937,7 +28535,7 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28952,17 +28550,6 @@ class Test_TC_CDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_CDOCONC_2_1 : public TestCommandBridge { @@ -29472,11 +29059,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: @@ -29704,74 +29286,20 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenCmoconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 7b: TH1 reads GeneratedCommandList 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 = TestStep7bTh1ReadsGeneratedCommandListFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -29874,18 +29402,6 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -29899,7 +29415,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -29954,11 +29470,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(); }]; @@ -30535,29 +30046,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30567,7 +30056,7 @@ class Test_TC_CMOCONC_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)); @@ -30583,18 +30072,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -30604,7 +30082,7 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -30619,17 +30097,6 @@ class Test_TC_CMOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bTh1ReadsGeneratedCommandListFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_CMOCONC_2_1 : public TestCommandBridge { @@ -31139,11 +30606,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: @@ -31371,74 +30833,20 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenFldconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -31541,18 +30949,6 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -31566,7 +30962,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -31621,11 +31017,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(); }]; @@ -32202,29 +31593,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32234,7 +31603,7 @@ class Test_TC_FLDCONC_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)); @@ -32250,18 +31619,7 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7ReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -32286,17 +31644,6 @@ class Test_TC_FLDCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_FLDCONC_2_1 : public TestCommandBridge { @@ -32806,11 +32153,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: @@ -33038,75 +32380,20 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenNdoconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -33209,18 +32496,6 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -33234,7 +32509,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -33289,11 +32564,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(); }]; @@ -33870,29 +33140,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33902,7 +33150,7 @@ class Test_TC_NDOCONC_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)); @@ -33918,18 +33166,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33939,7 +33176,7 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -33954,17 +33191,6 @@ class Test_TC_NDOCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_NDOCONC_2_1 : public TestCommandBridge { @@ -34474,10 +33700,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: @@ -34702,73 +33924,20 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenOzconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: Read the global attribute: EventList. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bReadTheGlobalAttributeEventList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -34871,18 +34040,6 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -34896,7 +34053,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -34951,11 +34108,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(); }]; @@ -35531,29 +34683,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bReadTheGlobalAttributeEventList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35563,7 +34693,7 @@ class Test_TC_OZCONC_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)); @@ -35579,18 +34709,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -35600,7 +34719,7 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -35615,17 +34734,6 @@ class Test_TC_OZCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_OZCONC_2_1 : public TestCommandBridge { @@ -36135,11 +35243,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: @@ -36367,74 +35470,20 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmhconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -36537,18 +35586,6 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -36562,7 +35599,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -36617,11 +35654,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(); }]; @@ -37198,29 +36230,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37230,7 +36240,7 @@ class Test_TC_PMHCONC_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)); @@ -37246,18 +36256,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -37267,7 +36266,7 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -37282,17 +36281,6 @@ class Test_TC_PMHCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_PMHCONC_2_1 : public TestCommandBridge { @@ -37802,11 +36790,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: @@ -38034,74 +37017,20 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmiconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7b: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7bReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -38204,18 +37133,6 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -38229,7 +37146,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -38284,11 +37201,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(); }]; @@ -38865,29 +37777,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38897,7 +37787,7 @@ class Test_TC_PMICONC_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)); @@ -38913,18 +37803,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7bReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -38934,7 +37813,7 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7b: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -38949,17 +37828,6 @@ class Test_TC_PMICONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_PMICONC_2_1 : public TestCommandBridge { @@ -39469,11 +38337,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: @@ -39701,74 +38564,20 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenPmkconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : 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_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : 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_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -39871,18 +38680,6 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -39896,7 +38693,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -39951,11 +38748,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(); }]; @@ -40532,29 +39324,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40564,7 +39334,7 @@ class Test_TC_PMKCONC_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)); @@ -40580,18 +39350,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -40601,7 +39360,7 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -40616,17 +39375,6 @@ class Test_TC_PMKCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_PMKCONC_2_1 : public TestCommandBridge { @@ -41136,10 +39884,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: @@ -41364,77 +40108,20 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenRnconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : Step 4l: TH reads the AttributeList attribute from the 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")) { - NextTest(); - return; - } - err = TestStep4lThReadsTheAttributeListAttributeFromTheDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : Step 6b: Read the global attribute AcceptedCommandList. 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 = TestStep6bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 7b: Read the global attribute: GeneratedCommandList. 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 = TestStep7bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -41537,18 +40224,6 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -41562,7 +40237,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -41617,11 +40292,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(); }]; @@ -42197,29 +40867,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4lThReadsTheAttributeListAttributeFromTheDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42229,7 +40877,7 @@ class Test_TC_RNCONC_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)); @@ -42245,18 +40893,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -42266,7 +40903,7 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -42281,17 +40918,6 @@ class Test_TC_RNCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_RNCONC_2_1 : public TestCommandBridge { @@ -42801,11 +41427,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: @@ -43036,76 +41657,20 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { err = TestStep4kCheckThatLevelValueIsExcludedFromAttributeListWhenTvocconcsf01LevIsNotSet_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : 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")) { - NextTest(); - return; - } - err = TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Step 5a: 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; } NextTest(); return; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_30(); - break; - case 31: - ChipLogProgress(chipTool, - " ***** Test Step 31 : Step 6b: Read the global attribute: AcceptedCommandList. 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 = TestStep6bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_32(); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_28(); break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 7b: Read the global attribute: GeneratedCommandList. 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 = TestStep7bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_29(); break; } @@ -43208,18 +41773,6 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -43233,7 +41786,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 34; + const uint16_t mTestCount = 30; chip::Optional mNodeId; chip::Optional mCluster; @@ -43290,11 +41843,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(); }]; @@ -43895,29 +42443,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_27() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_29() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_30() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43928,7 +42454,7 @@ class Test_TC_TVOCCONC_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)); @@ -43944,18 +42470,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_31() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_32() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43966,7 +42481,7 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43981,17 +42496,6 @@ class Test_TC_TVOCCONC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_33() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_TVOCCONC_2_1 : public TestCommandBridge { @@ -44735,7 +43239,7 @@ class TestIcdManagementCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2000UL)); + VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2UL)); } NextTest(); @@ -45500,83 +44004,36 @@ class Test_TC_OPCREDS_1_2 : public TestCommandBridge { err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); + 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"); + 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); - 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TH reads GeneratedCommandList from DUT\n"); - 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")) { - NextTest(); - return; - } - err = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -45613,15 +44070,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. @@ -45635,7 +44083,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; @@ -45702,7 +44150,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"); @@ -45712,7 +44160,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)); @@ -45736,7 +44184,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"); @@ -45746,7 +44194,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)); @@ -45769,29 +44217,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -45801,7 +44227,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)); @@ -45821,18 +44247,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"); @@ -45842,7 +44257,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)); @@ -45857,17 +44272,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 { @@ -46003,98 +44407,52 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { 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")) { - NextTest(); - return; - } - err = TestStep4jThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5a: TH1 reads EventList from DUT\n"); + 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; } NextTest(); return; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5b: Read BINFO.S.E00(StartUp) event in EventList\n"); + case 14: + 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 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 5c: Read BINFO.S.E01(ShutDown) event in EventList\n"); + case 15: + 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 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 5d: Read BINFO.S.E02(Leave) event in EventList\n"); + case 16: + 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 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 5e: Read (ReachableChanged) event in EventList\n"); + case 17: + 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 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5fThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); - 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")) { - NextTest(); - return; - } - err = TestStep6ThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: TH reads from the DUT the AcceptedCommandList attribute.\n"); + err = TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_18(); 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")) { - 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; } @@ -46167,12 +44525,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. @@ -46186,7 +44538,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; @@ -46492,48 +44844,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; } }; @@ -46663,119 +45014,72 @@ class Test_TC_CNET_1_3 : public TestCommandBridge { 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 6a: Read AcceptedCommandList If DUT supports Wi-Fi/Thread related features " + " ***** 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 = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_13(); + err = TestStep6aReadAcceptedCommandListIfDutSupportsWiFiThreadRelatedFeaturesCnetsf00wicnetsf01th_12(); break; - case 14: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 6b: Read AcceptedCommandList If DUT supports Wi-Fi related features (CNET.S.F00(WI) is " + " ***** 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 = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_14(); + err = TestStep6bReadAcceptedCommandListIfDutSupportsWiFiRelatedFeaturesCnetsf00wiIsTrue_13(); break; - case 15: + case 14: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 6c: Read AcceptedCommandList If DUT supports Thread related features(CNET.S.F01(TH) 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.F01")) { NextTest(); return; } - err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_15(); + err = TestStep6cReadAcceptedCommandListIfDutSupportsThreadRelatedFeaturesCNETSF01THIsTrue_14(); break; - case 16: + case 15: 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")) { NextTest(); return; } - err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_16(); - 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")) { - NextTest(); - return; - } - err = TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + err = TestStep6dReadAcceptedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02THIsTrue_15(); 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 )")) { 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")) { 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")) { - NextTest(); - return; - } - err = TestStep7cThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestStep7bReadTheGeneratedCommandListIfDutSupportsEthernetRelatedFeaturesCNETSF02ETMustBeTrue_17(); break; } @@ -46842,15 +45146,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. @@ -46864,7 +45159,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; @@ -47136,29 +45431,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -47186,7 +45459,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"); @@ -47210,7 +45483,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"); @@ -47234,7 +45507,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"); @@ -47260,18 +45533,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"); @@ -47298,7 +45560,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"); @@ -47324,17 +45586,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 { @@ -47380,86 +45631,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"); - if (ShouldSkip("PICS_USER_PROMPT")) { + 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"); + if (ShouldSkip("!DESC.S.F00")) { NextTest(); return; } - err = TestStep2ReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: Read the global attribute: FeatureMap\n"); - err = TestStep3ReadTheGlobalAttributeFeatureMap_2(); + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { + " ***** 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 = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } @@ -47499,6 +45732,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. @@ -47512,7 +45748,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; @@ -47527,17 +45763,31 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheClusterRevisionAttribute_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 = [[MTRBaseClusterDescriptor 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: 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, 2U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -47545,14 +45795,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(); @@ -47561,7 +45827,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"); @@ -47569,7 +45835,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)); @@ -47591,7 +45857,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"); @@ -47599,7 +45865,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)); @@ -47620,48 +45886,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -47704,95 +45997,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"); err = TestStep2ThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TTH reads the FeatureMap from DUT\n"); - 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"); + 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"); + 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")) { + 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 5: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); - 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")) { - NextTest(); - return; - } - err = TestStep6bTthReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7a: TTH reads GeneratedCommandList from DUT\n"); - 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")) { - NextTest(); - return; - } - err = TestStep7bTthReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_7(); break; } @@ -47829,15 +46075,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. @@ -47851,14 +46088,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; @@ -47890,7 +46127,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"); @@ -47898,7 +46135,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)); @@ -47914,7 +46151,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"); @@ -47922,7 +46159,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)); @@ -47940,7 +46177,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"); @@ -47948,7 +46185,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)); @@ -47965,29 +46202,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -47995,7 +46210,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)); @@ -48012,18 +46227,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"); @@ -48031,7 +46235,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)); @@ -48047,17 +46251,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 { @@ -48233,75 +46426,32 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("( DGETH.S.F00 || DGETH.S.F01 )")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_18(); + err = TestStep6ThReadsAcceptedCommandListFromDut_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !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")) { - NextTest(); - return; - } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_20(); + err = TestStep6ThReadsAcceptedCommandListFromDut_18(); 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_19(); break; } @@ -48374,12 +46524,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. @@ -48393,7 +46537,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; @@ -48774,29 +46918,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -48806,7 +46928,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)); @@ -48819,7 +46941,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"); @@ -48829,7 +46951,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)); @@ -48845,26 +46967,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; } }; @@ -50312,59 +48438,20 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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")) { - 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_8(); break; } @@ -50404,9 +48491,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. @@ -50420,7 +48504,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; @@ -50561,48 +48645,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -50892,74 +48980,36 @@ class Test_TC_FLABEL_1_1 : public TestCommandBridge { err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); + 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"); + 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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")) { - 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -50996,9 +49046,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. @@ -51012,7 +49059,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; @@ -51075,7 +49122,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"); @@ -51083,7 +49130,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)); @@ -51102,7 +49149,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"); @@ -51110,7 +49157,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)); @@ -51128,48 +49175,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -51216,185 +49267,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 3f: 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")) { - NextTest(); - return; - } - err = TestStep3fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 4a: 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 = TestStep4aReadTheGlobalAttributeAcceptedCommandList_16(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_15(); break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 4b: 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")) { - NextTest(); - return; - } - err = TestStep4bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : Step 5a: Read the optional command (ResetCondition) in AcceptedCommandList\n"); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6: Read the optional command (Step) in AcceptedCommandList\n"); if (ShouldSkip("FAN.S.C00.Rsp")) { NextTest(); return; } - err = TestStep5aReadTheOptionalCommandResetConditionInAcceptedCommandList_18(); + err = TestStep6ReadTheOptionalCommandStepInAcceptedCommandList_16(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 5b: TH reads from the DUT the GeneratedCommandList attribute. 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 = TestStep5bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_17(); break; } @@ -51461,12 +49469,6 @@ class Test_TC_FAN_1_1 : 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; } // Go on to the next test. @@ -51480,7 +49482,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -51495,17 +49497,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"); @@ -51513,7 +49529,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)); @@ -51529,7 +49545,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"); @@ -51537,7 +49553,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)); @@ -51548,7 +49564,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"); @@ -51556,7 +49572,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)); @@ -51567,7 +49583,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"); @@ -51575,7 +49591,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)); @@ -51586,7 +49602,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"); @@ -51594,7 +49610,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)); @@ -51605,7 +49621,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"); @@ -51613,7 +49629,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)); @@ -51624,7 +49640,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"); @@ -51632,7 +49648,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)); @@ -51643,7 +49659,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"); @@ -51651,7 +49667,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)); @@ -51673,7 +49689,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"); @@ -51681,7 +49697,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)); @@ -51702,7 +49718,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"); @@ -51710,7 +49726,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)); @@ -51725,7 +49741,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"); @@ -51733,7 +49749,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)); @@ -51747,7 +49763,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"); @@ -51755,7 +49771,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)); @@ -51769,7 +49785,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"); @@ -51777,7 +49793,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)); @@ -51790,18 +49806,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep3fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep4aReadTheGlobalAttributeAcceptedCommandList_16() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51809,7 +49814,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 4a: 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)); @@ -51825,18 +49830,7 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep5aReadTheOptionalCommandResetConditionInAcceptedCommandList_18() + CHIP_ERROR TestStep6ReadTheOptionalCommandStepInAcceptedCommandList_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -51844,7 +49838,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 5a: 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)); @@ -51857,15 +49851,28 @@ class Test_TC_FAN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep5bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_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); + 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; } }; @@ -52570,121 +50577,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 @@ -54455,95 +52347,44 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { 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")) { - NextTest(); - return; - } - err = TestStep4hThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5a: Read the global attribute: EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: Read the global attribute: EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5b: Read optional event(HardwareFaultChange) in EventList\n"); + case 12: + 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 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 5c: Read optional event(RadioFaultChange) in EventList\n"); + case 13: + 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 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5d: Read optional event(NetworkFaultChange) in EventList\n"); + case 14: + 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 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Step 5e: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5eThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_17(); - 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_15(); 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_16(); break; } @@ -54607,15 +52448,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. @@ -54629,7 +52461,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; @@ -54895,29 +52727,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 - TestStep5eThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -54927,7 +52737,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)); @@ -54940,457 +52750,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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_DGGEN_2_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") - , 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_DGGEN_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_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: Wait for the commissioned device to be retrieved\n"); - 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(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads a RebootCount attribute value from DUT.\n"); - if (ShouldSkip("DGGEN.S.A0001")) { - NextTest(); - return; - } - err = TestStep3ThReadsARebootCountAttributeValueFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep3aRebootTargetDevice_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStep3bRebootTargetDeviceDUT_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3c: Reboot target device\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestStep3cRebootTargetDevice_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3d: Reboot target device(DUT)\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestStep3dRebootTargetDeviceDUT_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_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(); - 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; - } - - // 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() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55399,59 +52759,22 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { 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); + [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)); - VerifyOrReturn(CheckConstraintMinValue("bootReason", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("bootReason", [value unsignedCharValue], 6U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); 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 { @@ -55518,104 +52841,36 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { err = TestStep3bGivenGrpkeysf00csEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); + 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 4a: TH reads AttributeList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4: TH reads AttributeList from DUT\n"); if (ShouldSkip(" !PICS_EVENT_LIST_ENABLED ")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_5(); + err = TestStep4ThReadsAttributeListFromDut_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"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5: 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : 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_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6aThReadsAcceptedCommandListFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : 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_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 7a: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7aThReadsGeneratedCommandListFromDut_12(); + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_7(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : 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_13(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_8(); break; } @@ -55655,21 +52910,6 @@ class Test_TC_GRPKEY_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; - 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. @@ -55683,7 +52923,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -55771,7 +53011,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"); @@ -55781,7 +53021,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)); @@ -55803,7 +53043,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"); @@ -55813,7 +53053,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)); @@ -55834,40 +53074,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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5bThReadsEventListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR TestStep6aThReadsAcceptedCommandListFromDut_10() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55877,7 +53084,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)); @@ -55893,18 +53100,7 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aThReadsGeneratedCommandListFromDut_12() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55914,7 +53110,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)); @@ -55927,24 +53123,13 @@ class Test_TC_GRPKEY_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } }; -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); @@ -55954,7 +53139,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 @@ -55962,11 +53147,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; } @@ -55979,175 +53164,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: TH reads ClusterRevision attribute from DUT\n"); - err = TestStep2ThReadsClusterRevisionAttributeFromDut_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: TH reads FeatureMap attribute from DUT\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 = TestStep3ThReadsFeatureMapAttributeFromDut_2(); + err = TestStep2ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads FeatureMap attribute from DUT\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 = TestStep3ThReadsFeatureMapAttributeFromDut_3(); + err = TestStep3ThSendsKeySetReadCommandToGroupKeyManagementClusterWithGroupKeySetIDAs0x01a_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList attribute from DUT\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 = TestStep4aThReadsAttributeListAttributeFromDut_4(); + err = TestStep4ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutOnEp0_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList attribute from DUT\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 = TestStep4aThReadsAttributeListAttributeFromDut_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 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")) { + 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; } - err = TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep9ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: Read the global attribute: EventList\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + 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; } - NextTest(); - return; + err = TestStep10ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_10(); + break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { + " ***** 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 = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11(); + err = TestStep11ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime1IsEarlierThanEpochStartTime0_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6a: TH reads AcceptedCommandList attribute from DUT\n"); - if (ShouldSkip(" !ICDM.S.F00 && !ICDM.S.C03.Rsp ")) { + 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 = TestStep6aThReadsAcceptedCommandListAttributeFromDut_12(); + err = TestStep12ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey1AndEpochStartTime1AreNullWhenEpochKey2AndEpochStartTime2AreNotNull_12(); break; case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Step 6b: TH reads AcceptedCommandList attribute from DUT if ICDM.S.F00 is true\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 = TestStep6bThReadsAcceptedCommandListAttributeFromDutIfIcdmsf00IsTrue_13(); + err = TestStep13ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsSetToNullAndEpochStartTime2IsNotNull_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : Step 6c: Read the optional command (StayActiveRequest) in AttributeList\n"); - if (ShouldSkip("ICDM.S.C03.Rsp")) { + 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 = TestStep6cReadTheOptionalCommandStayActiveRequestInAttributeList_14(); + err = TestStep14ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsNotNullAndEpochStartTime2IsNull_14(); break; case 15: ChipLogProgress(chipTool, - " ***** Test Step 15 : Step 6d: 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")) { + " ***** 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 = TestStep6dThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + err = TestStep15ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime2IsEarlierThanEpochStartTime1_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7a: TH reads GeneratedCommandList attribute from DUT\n"); - if (ShouldSkip(" !ICDM.S.F00 ")) { + 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 = TestStep7aThReadsGeneratedCommandListAttributeFromDut_16(); + err = TestStep16ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7a: TH reads GeneratedCommandList attribute from DUT\n"); - if (ShouldSkip("ICDM.S.F00")) { + 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 = TestStep7aThReadsGeneratedCommandListAttributeFromDut_17(); + err = TestStep16RepeatTheStepBySendingEpochKey1With1ByteValue16Bytes_17(); break; case 18: ChipLogProgress(chipTool, - " ***** Test Step 18 : 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")) { + " ***** 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 = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); + 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; } @@ -56179,44 +53518,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), 0)); + 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)); + 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)); + 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)); + 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)); + 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. @@ -56230,375 +53614,1348 @@ class Test_TC_ICDM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + 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 TestStep2ThReadsClusterRevisionAttributeFromDut_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: TH reads ClusterRevision attribute from DUT 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 TestStep3ThReadsFeatureMapAttributeFromDut_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: TH reads FeatureMap attribute from DUT 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 TestStep3ThReadsFeatureMapAttributeFromDut_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: TH reads FeatureMap attribute from DUT 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 TestStep4aThReadsAttributeListAttributeFromDut_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: TH reads AttributeList attribute from DUT 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 TestStep4aThReadsAttributeListAttributeFromDut_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: TH reads AttributeList attribute from DUT 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 TestStep9ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_9() + { + + 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 = 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]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 9: 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_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep10ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDut_10() + { + + 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 = 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]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Step 10: 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_INVALID_COMMAND)); + NextTest(); + }]; return CHIP_NO_ERROR; } CHIP_ERROR - TestStep4eThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9() + TestStep11ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime1IsEarlierThanEpochStartTime0_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); + 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: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]; + + [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(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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_11() + TestStep12ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey1AndEpochStartTime1AreNullWhenEpochKey2AndEpochStartTime2AreNotNull_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); + 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 = 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]; + + [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(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 TestStep6aThReadsAcceptedCommandListAttributeFromDut_12() + CHIP_ERROR + TestStep13ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochKey2IsSetToNullAndEpochStartTime2IsNotNull_13() { 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: TH reads AcceptedCommandList attribute from DUT 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 = + [NSNumber numberWithUnsignedLongLong:18446744073709551614ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [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); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - 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 TestStep6bThReadsAcceptedCommandListAttributeFromDutIfIcdmsf00IsTrue_13() + CHIP_ERROR + TestStep15ThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteEpochStartTime2IsEarlierThanEpochStartTime1_15() { 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: TH reads AcceptedCommandList attribute from DUT if ICDM.S.F00 is true 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:1ULL]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [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(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + 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 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 TestStep6cReadTheOptionalCommandStayActiveRequestInAttributeList_14() + CHIP_ERROR TestStep16RepeatTheStepBySendingEpochKey1With1ByteValue16Bytes_17() { 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 6c: Read the optional command (StayActiveRequest) in 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" + 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]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [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(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; - 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 - TestStep6dThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15() + TestStep16aThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having15BytesValue16Byte_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 = [[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 TestStep7aThReadsGeneratedCommandListAttributeFromDut_16() + CHIP_ERROR TestStep16aRepeatStep16aBySendingKeySetWriteCommandWithEpochKey1Having15BytesValue16Byte_20() { 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 7a: TH reads GeneratedCommandList attribute from DUT 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" 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]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [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); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - 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 TestStep7aThReadsGeneratedCommandListAttributeFromDut_17() + CHIP_ERROR + TestStep16bThSendsKeySetWriteCommandInTheGroupKeyManagementClusterToDutNoteRepeatStep16BySendingKeySetWriteCommandWithEpochKey0EpochKey1AndEpochKey2Having17BytesValue16Bytes_22() { 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 7a: TH reads GeneratedCommandList attribute from DUT 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\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]; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [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(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_CONSTRAINT_ERROR)); + NextTest(); + }]; - 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 - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18() + 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("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 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); @@ -56608,7 +54965,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 @@ -56616,11 +54973,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; } @@ -56637,53 +54994,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; } @@ -56717,6 +55137,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. @@ -56730,7 +55174,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; @@ -56744,133 +55188,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)); - VerifyOrReturn(CheckConstraintType("clientsSupportedPerFabric", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("clientsSupportedPerFabric", [value unsignedShortValue], 1U)); + { + 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("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); NextTest(); }]; @@ -56963,15 +55578,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 && PICS_EVENT_LIST_ENABLED")) { + 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) { @@ -57205,17 +55818,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 { @@ -57408,89 +56010,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; } @@ -57536,6 +56156,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. @@ -57549,22 +56175,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 TestStep2aThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() + 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_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -57587,7 +56250,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"); @@ -57608,7 +56271,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; @@ -57616,7 +56279,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"); @@ -57637,18 +56300,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"); @@ -57671,7 +56323,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"); @@ -57694,7 +56346,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"); @@ -57717,15 +56369,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"); @@ -57733,18 +56385,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 { @@ -58506,15 +57169,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 && PICS_EVENT_LIST_ENABLED")) { + 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(); @@ -58751,17 +57412,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() { @@ -65681,33 +64331,953 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { NextTest(); return; } - err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); + err = TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16(); + 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")) { + NextTest(); + return; + } + err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); + 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")) { + NextTest(); + return; + } + err = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); + 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")) { + NextTest(); + return; + } + err = TestStep5bThReadsTheCurrentFrequencyAttribute_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 mRandomLevelValue; + chip::Optional mRandomFrequencyValue; + 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); + } + + 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() + { + + 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)); + { + maxLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + 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); + + __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(CheckValue("status", err ? err.code : 0, 0)); + + 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() + { + + 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 1d: 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, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull CurrentFrequencyValue; + + CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_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 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 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 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)); + { + MinFrequencyValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull MaxFrequencyValue; + + 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); + + [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); + + 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; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + 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 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)); + + VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + 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() + { + + 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_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_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 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 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(); + }]; + + 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() + { + + 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 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)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LCFG_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") + , 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_LCFG_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_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 3: TH reads the FeatureMap from DUT\n"); + err = TestStep3ThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + err = TestStep4ThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\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(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_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 TestStep2ThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration 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: 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 TestStep3ThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration 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 the FeatureMap from 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 TestStep4ThReadsAttributeListFromDut_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + 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); + + 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 TestStep4ThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(0) + 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); + + 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 TestStep6ThReadsAcceptedCommandListFromDut_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration 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 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 TestStep7ThReadsGeneratedCommandListFromDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration 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 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; + } +}; + +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) + + ~Test_TC_LUNIT_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + 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 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 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4bThReadsTheCurrentFrequencyAttribute_17(); + err = TestStep4aThReadsAttributeListFromDut_5(); 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 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 = TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18(); + err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6(); 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 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep5bThReadsTheCurrentFrequencyAttribute_19(); + 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; } @@ -65750,36 +65320,6 @@ class Test_TC_LVL_7_1 : 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; - 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. @@ -65793,16 +65333,14 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRandomLevelValue; - chip::Optional mRandomFrequencyValue; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -65810,114 +65348,117 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionWriteDefaultValueOfOnOffTransitionTimeAttribute_1() + 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); - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completion:^(NSError * _Nullable err) { - NSLog( - @"Precondition: write default value of OnOffTransitionTime attribute 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep0aThWrites0ToTheOptionsAttribute_2() + 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); - 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); + [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(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep0bThSendsOnCommandToDut_3() + CHIP_ERROR TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_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 0b: TH sends On command to 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)); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull minLevelValue; - CHIP_ERROR TestStep1aThReadsTheMinLevelAttributeFromTheDut_4() + 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 readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1a: TH reads the MinLevel attribute from 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(CheckConstraintType("minLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 254U)); - { - minLevelValue = value; - } + 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; } - NSNumber * _Nonnull maxLevelValue; - CHIP_ERROR TestStep1bThReadsTheMaxLevelAttributeFromTheDut_5() + 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 readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1b: TH reads the MaxLevel attribute from 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(CheckConstraintType("maxLevel", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("maxLevel", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxLevel", [value unsignedCharValue], 254U)); - { - maxLevelValue = value; - } + 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(); }]; @@ -65925,220 +65466,304 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep1cThSendsAMoveToLevelCommandToDutWithTheLevelFieldSetToAValueBetweenTheMinLevelAndMaxLevelValuesIfPresentOtherwiseBetween0x01And0xFEAndTheTransitionTimeFieldSetTo0x0000MoveImmediately_6() + 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); - __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(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4b: TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - return CHIP_NO_ERROR; - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - CHIP_ERROR TestWait100ms_7() - { + NextTest(); + }]; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep1dThReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_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); - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 1d: TH reads CurrentLevel attribute from DUT 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(CheckValueNonNull("CurrentLevel", actualValue)); - VerifyOrReturn( - CheckValue("CurrentLevel", actualValue, mRandomLevelValue.HasValue() ? mRandomLevelValue.Value() : 100U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentFrequencyValue; - CHIP_ERROR TestStep2aThReadsTheCurrentFrequencyAttribute_9() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { 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 readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2a: TH reads the CurrentFrequency attribute. 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)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], 65535U)); { - CurrentFrequencyValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull MinFrequencyValue; +}; - CHIP_ERROR TestStep2bThReadsTheMinFrequencyAttribute_10() +class Test_TC_LUNIT_3_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") + , 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 = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_LUNIT_3_1() {} - [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 2b: TH reads the MinFrequency attribute. 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_3_1\n"); + } - VerifyOrReturn(CheckConstraintType("minFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minFrequency", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minFrequency", [value unsignedShortValue], 65535U)); - { - MinFrequencyValue = value; - } + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; + Wait(); - return CHIP_NO_ERROR; + // 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: TH reads TemperatureUnit attribute from DUT\n"); + if (ShouldSkip("LUNIT.S.A0000")) { + NextTest(); + return; + } + err = TestStep1ThReadsTemperatureUnitAttributeFromDut_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")) { + NextTest(); + return; + } + err = TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Fahrenheit")) { + NextTest(); + return; + } + err = TestStep3ThReadsTemperatureUnitAttribute_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")) { + NextTest(); + return; + } + err = TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Celsius")) { + NextTest(); + return; + } + err = TestStep5ThReadsTemperatureUnitAttribute_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")) { + NextTest(); + return; + } + err = TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000 && LUNIT.TempUnit.Kelvin")) { + NextTest(); + return; + } + err = TestStep7ThReadsTemperatureUnitAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 8: TH writes 5 to TemperatureUnit attribute\n"); + if (ShouldSkip("LUNIT.S.A0000")) { + NextTest(); + return; + } + err = TestStep8ThWrites5ToTemperatureUnitAttribute_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - NSNumber * _Nonnull MaxFrequencyValue; - CHIP_ERROR TestStep2cThReadsTheMaxFrequencyAttributeAndCheckIfFmaxFminFailTheTest_11() + 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), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + 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); + } - [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); + 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 = 9; - VerifyOrReturn(CheckConstraintType("maxFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("maxFrequency", [value unsignedShortValue], 65535U)); - { - MaxFrequencyValue = value; - } + 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 TestStep2dSanityCheckOnValuesReadInSteps2a2cIfFcFminFailTheTestAndFcFmaxFailTheTest_12() + 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); - [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 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(CheckConstraintType("currentFrequency", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentFrequency", [value unsignedShortValue], MinFrequencyValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentFrequency", [value unsignedShortValue], MaxFrequencyValue)); - + VerifyOrReturn(CheckConstraintType("temperatureUnit", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep3aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToARandomValueFrandChosenSuchThatFminFrandFmax_13() + 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); - __auto_type * params = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; - params.frequency = mRandomFrequencyValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRandomFrequencyValue.Value()] - : [NSNumber numberWithUnsignedShort:30000U]; + id temperatureUnitArgument; + temperatureUnitArgument = [NSNumber numberWithUnsignedChar:0U]; [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); + 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 TestWait100ms_14() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestStep3bThReadsTheCurrentFrequencyAttribute_15() + CHIP_ERROR TestStep3ThReadsTemperatureUnitAttribute_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 readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 3b: TH reads the CurrentFrequency attribute. 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( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); } NextTest(); @@ -66147,32 +65772,43 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmax1_16() + CHIP_ERROR TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsTheCurrentFrequencyAttribute_17() + 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 readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 4b: TH reads the CurrentFrequency attribute. 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(CheckValue( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 1U)); } NextTest(); @@ -66181,32 +65817,42 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5aThSendsAMoveToClosestFrequencyCommandToDutWithTheFrequencyFieldSetToFmin1_18() + CHIP_ERROR TestStep6ThWrites2KelvinToTemperatureUnitAttribute_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 = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestStep5bThReadsTheCurrentFrequencyAttribute_19() + CHIP_ERROR TestStep7ThReadsTemperatureUnitAttribute_7() { 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 readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5b: TH reads the CurrentFrequency attribute. Error: %@", err); + [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( - "CurrentFrequency", actualValue, mRandomFrequencyValue.HasValue() ? mRandomFrequencyValue.Value() : 30000U)); + VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); } NextTest(); @@ -66214,13 +65860,38 @@ class Test_TC_LVL_7_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestStep8ThWrites5ToTemperatureUnitAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) 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); + + 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_LTIME_1_2 : 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_LTIME_1_2() + : TestCommandBridge("Test_TC_LTIME_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -66230,7 +65901,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LCFG_1_1() {} + ~Test_TC_LTIME_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -66238,11 +65909,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_LTIME_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -66267,36 +65938,54 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { err = TestStep3ThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads AttributeList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ThReadsAttributeListFromDut_3(); + err = TestStep4aThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads AttributeList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ThReadsAttributeListFromDut_4(); + err = TestStep4aThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: EventList\n"); + 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 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6ThReadsAcceptedCommandListFromDut_6(); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListFromDut_8(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_7(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_9(); break; } @@ -66333,6 +66022,12 @@ 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; } // Go on to the next test. @@ -66346,7 +66041,7 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -66365,9 +66060,9 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -66391,9 +66086,9 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -66401,35 +66096,32 @@ class Test_TC_LCFG_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")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __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 4: TH reads AttributeList from DUT Error: %@", 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, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); @@ -66443,23 +66135,22 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep4aThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __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 4: TH reads AttributeList from DUT Error: %@", 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, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); @@ -66472,13 +66163,59 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_6() + CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __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 TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_6() + { + + 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 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from 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 TestStep6ThReadsAcceptedCommandListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -66498,13 +66235,13 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_7() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -66525,11 +66262,11 @@ class Test_TC_LCFG_1_1 : public TestCommandBridge { } }; -class Test_TC_LUNIT_1_2 : public TestCommandBridge { +class Test_TC_LTIME_3_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_LTIME_3_1() + : TestCommandBridge("Test_TC_LTIME_3_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -66539,7 +66276,7 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_1_2() {} + ~Test_TC_LTIME_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -66547,11 +66284,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_LTIME_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -66564,70 +66301,98 @@ 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 0: Wait for the commissioned device to be retrieved\n"); + err = TestStep0WaitForTheCommissionedDeviceToBeRetrieved_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 1: TH reads HourFormat attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0000")) { + NextTest(); + return; + } + err = TestStep1ThReadsHourFormatAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads the FeatureMap from DUT\n"); - if (ShouldSkip(" !LUNIT.S.F00 ")) { + 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 = TestStep3ThReadsTheFeatureMapFromDut_2(); + err = TestStep2IfLtimesa000012hrThWrites0ToHourFormatAttribute_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")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3(); + err = TestStep3ThReadsHourFormatAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + 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 = TestStep4aThReadsAttributeListFromDut_4(); + err = TestStep4IfLtimesa000024hrThWrites1ToHourFormatAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: TH reads HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { NextTest(); return; } - err = TestStep4aThReadsAttributeListFromDut_5(); + err = TestStep5ThReadsHourFormatAttribute_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")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: TH reads ActiveCalendarType attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0001")) { NextTest(); return; } - err = TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6(); + err = TestStep6ThReadsActiveCalendarTypeAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5: TH reads EventList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads SupportedCalendarTypes attribute from DUT\n"); + if (ShouldSkip("LTIME.S.A0002")) { NextTest(); return; } - NextTest(); - return; + err = TestStep7ThReadsSupportedCalendarTypesAttributeFromDut_7(); + break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6: TH reads AcceptedCommandList from DUT\n"); - err = TestStep6ThReadsAcceptedCommandListFromDut_8(); + ChipLogProgress(chipTool, + " ***** 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 = TestStep8ThWritesValueInPixitltimesctToActiveCalendarTypeAttributeFollowedByReadingTheActiveCalendarTypeAttributeValue_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_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 = TestStep9RepeatStep8ForAllTheValuesInPixitltimesct_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 10: TH writes 50 to ActiveCalendarType attribute\n"); + if (ShouldSkip("LTIME.S.A0001")) { + NextTest(); + return; + } + err = TestStep10ThWrites50ToActiveCalendarTypeAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 11: TH writes 5 to HourFormat attribute\n"); + if (ShouldSkip("LTIME.S.A0000")) { + NextTest(); + return; + } + err = TestStep11ThWrites5ToHourFormatAttribute_11(); break; } @@ -66670,6 +66435,12 @@ 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), 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. @@ -66683,14 +66454,14 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 12; 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; @@ -66698,92 +66469,118 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep1ThReadsHourFormatAttributeFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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: TH reads the ClusterRevision from 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("hourFormat", "enum8", "enum8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep2IfLtimesa000012hrThWrites0ToHourFormatAttribute_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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 the FeatureMap from DUT 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)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3ThReadsHourFormatAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [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(CheckValue("FeatureMap", actualValue, 0UL)); + VerifyOrReturn(CheckValue("HourFormat", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3GivenLunitsf00tempEnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestStep4IfLtimesa000024hrThWrites1ToHourFormatAttribute_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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: Given LUNIT.S.F00(TEMP) ensure featuremap has the correct bit set Error: %@", err); + 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(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 TestStep4aThReadsAttributeListFromDut_4() + CHIP_ERROR TestStep5ThReadsHourFormatAttribute_5() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __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); + [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("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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("HourFormat", actualValue, 1U)); + } NextTest(); }]; @@ -66791,24 +66588,22 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_5() + CHIP_ERROR TestStep6ThReadsActiveCalendarTypeAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __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); + [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("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)); + VerifyOrReturn(CheckConstraintMinValue("activeCalendarType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("activeCalendarType", [value unsignedCharValue], 11U)); NextTest(); }]; @@ -66816,81 +66611,108 @@ class Test_TC_LUNIT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsFeatureDependentLUNITSF00AttributeInAttributeList_6() + CHIP_ERROR TestStep7ThReadsSupportedCalendarTypesAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __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 Feature dependent(LUNIT.S.F00) attribute in AttributeList 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("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - + VerifyOrReturn(CheckConstraintMaxLength("supportedCalendarTypes", value, 12)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() + CHIP_ERROR + TestStep8ThWritesValueInPixitltimesctToActiveCalendarTypeAttributeFollowedByReadingTheActiveCalendarTypeAttributeValue_8() { - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + 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); + } - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT Error: %@", err); + CHIP_ERROR TestStep9RepeatStep8ForAllTheValuesInPixitltimesct_9() + { - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + 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); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + CHIP_ERROR TestStep10ThWrites50ToActiveCalendarTypeAttribute_10() + { - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + 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 TestStep7ThReadsGeneratedCommandListFromDut_9() + CHIP_ERROR TestStep11ThWrites5ToHourFormatAttribute_11() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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 from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } + id hourFormatArgument; + hourFormatArgument = [NSNumber numberWithUnsignedChar:5U]; + [cluster + writeAttributeHourFormatWithValue:hourFormatArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 11: TH writes 5 to HourFormat attribute 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_CONSTRAINT_ERROR)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_LUNIT_3_1 : public TestCommandBridge { +class Test_TC_LWM_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_LWM_1_1() + : TestCommandBridge("Test_TC_LWM_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -66900,7 +66722,7 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LUNIT_3_1() {} + ~Test_TC_LWM_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -66908,11 +66730,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_LWM_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LWM_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -66925,72 +66747,79 @@ 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"); - 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 : 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, bit 0: SHALL be 1 if and only if " + "LWM.S.F00(DEPONOFF)\n"); + if (ShouldSkip("LWM.S.F00")) { NextTest(); return; } - err = TestStep2ThWrites0FahrenheitToTemperatureUnitAttribute_2(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfLwmsf00deponoff_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.\n"); + if (ShouldSkip(" !LWM.S.F00 ")) { NextTest(); return; } - err = TestStep3ThReadsTemperatureUnitAttribute_3(); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_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 4a: TH reads from the DUT the AttributeList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_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 4b: Read the optional attribute(StartUpMode) in AttributeList\n"); + if (ShouldSkip("LWM.S.A0002")) { NextTest(); return; } - err = TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6(); + err = TestStep4bReadTheOptionalAttributeStartUpModeInAttributeList_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 4c: Read the Feature dependent attribute(DEPONOFF) in AttributeList\n"); + if (ShouldSkip("LWM.S.F00")) { NextTest(); return; } - err = TestStep7ThReadsTemperatureUnitAttribute_7(); + err = TestStep4cReadTheFeatureDependentAttributeDEPONOFFInAttributeList_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 5: TH reads from the DUT the EventList attribute.\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep8ThWrites5ToTemperatureUnitAttribute_8(); + 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; } @@ -67028,7 +66857,13 @@ 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; } @@ -67043,14 +66878,14 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 11; 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; @@ -67058,108 +66893,133 @@ 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 = [[MTRBaseClusterLaundryWasherMode 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 TestStep3ThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfLwmsf00deponoff_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); - 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, bit 0: SHALL be 1 if and only if LWM.S.F00(DEPONOFF) " + @"Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3ThReadsTemperatureUnitAttribute_3() + CHIP_ERROR TestStep3ThReadsFromTheDutTheFeatureMapAttribute_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 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. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 0U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThWrites1CelsiusToTemperatureUnitAttribute_4() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_4() { 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); - 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, 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 TestStep5ThReadsTemperatureUnitAttribute_5() + CHIP_ERROR TestStep4aThReadsFromTheDutTheAttributeListAttribute_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 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, 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(); }]; @@ -67167,43 +67027,45 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThWrites2KelvinToTemperatureUnitAttribute_6() + CHIP_ERROR TestStep4bReadTheOptionalAttributeStartUpModeInAttributeList_6() { 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); - 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 optional attribute(StartUpMode) in AttributeList 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, 2UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsTemperatureUnitAttribute_7() + CHIP_ERROR TestStep4cReadTheFeatureDependentAttributeDEPONOFFInAttributeList_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 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 attribute(DEPONOFF) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("TemperatureUnit", actualValue, 2U)); - } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -67211,47 +67073,71 @@ class Test_TC_LUNIT_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep8ThWrites5ToTemperatureUnitAttribute_8() + CHIP_ERROR TestStep6ThReadsFromTheDutTheAcceptedCommandListAttribute_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); - 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 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.domain isEqualToString:MTRInteractionErrorDomain] - ? err.code - : EMBER_ZCL_STATUS_FAILURE) - : 0, - EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - NextTest(); - }]; + 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 = [[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 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_LTIME_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_LTIME_1_2() - : TestCommandBridge("Test_TC_LTIME_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_LTIME_1_2() {} + ~Test_TC_LWM_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -67259,11 +67145,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_LWM_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LWM_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -67276,66 +67162,127 @@ class Test_TC_LTIME_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"); - err = TestStep2ThReadsTheClusterRevisionFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the SupportedModes attribute.\n"); + if (ShouldSkip("LWM.S.A0000")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheSupportedModesAttribute_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 CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheCurrentModeAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: TH reads AttributeList from DUT\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + 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 = TestStep4aThReadsAttributeListFromDut_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")) { + 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 4b: TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT\n"); - if (ShouldSkip("LTIME.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { NextTest(); return; } - err = TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_5(); + err = TestStep6ThReadsFromTheDutTheCurrentModeAttribute_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")) { + " ***** 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 = TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_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")) { + 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"); - err = TestStep6ThReadsAcceptedCommandListFromDut_8(); + 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 = TestStep9ManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitlwmmodeChangeOk_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 7: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7ThReadsGeneratedCommandListFromDut_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 10: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("LWM.S.A0001")) { + NextTest(); + return; + } + 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; } @@ -67378,6 +67325,18 @@ class Test_TC_LTIME_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. @@ -67391,14 +67350,17 @@ class Test_TC_LTIME_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; @@ -67406,49 +67368,49 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep2ThReadsFromTheDutTheSupportedModesAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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 = [[MTRBaseClusterTimeFormatLocalization 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("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 1UL)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); + { + old_current_mode_dut = value; + } NextTest(); }]; @@ -67456,56 +67418,68 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4aThReadsAttributeListFromDut_3() + CHIP_ERROR TestStep4ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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); + __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("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)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } - NextTest(); - }]; + 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 = [[MTRBaseClusterTimeFormatLocalization 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, 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)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); + { + Step6_current_mode_dut = value; + } NextTest(); }]; @@ -67513,22 +67487,38 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bThReadsOptionalAttributeActiveCalendarTypeInAttributeListFromDut_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 = [[MTRBaseClusterTimeFormatLocalization 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 optional attribute(ActiveCalendarType) in 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, 1UL)); + { + 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(); }]; @@ -67536,22 +67526,37 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cThReadsOptionalAttributeSupportedCalendarTypesInAttributeListFromDut_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 = [[MTRBaseClusterTimeFormatLocalization 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 4c: TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT 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, 2UL)); + VerifyOrReturn(CheckConstraintType("currentMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentMode", [value unsignedCharValue], 254U)); + { + Step10_current_mode_dut = value; + } NextTest(); }]; @@ -67559,52 +67564,120 @@ class Test_TC_LTIME_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_8() + CHIP_ERROR TestStep11ThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitlwmmodeChangeOk_10() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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 = [[MTRBaseClusterTimeFormatLocalization 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(); }]; @@ -80337,20 +80410,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"); @@ -80387,75 +80460,20 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { err = TestStep4cThReadsTheOptionalAttributeOnModeInAttributeListFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 4d: 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")) { - NextTest(); - return; - } - err = TestStep4dThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 5a: TH reads from the DUT the EventList attribute\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; } NextTest(); return; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6a: TH reads AcceptedCommandList attribute from DUT\n"); - err = TestStep6aThReadsAcceptedCommandListAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7a: TH reads GeneratedCommandList attribute from DUT\n"); - err = TestStep7aThReadsGeneratedCommandListAttributeFromDut_13(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6: TH reads AcceptedCommandList attribute from DUT\n"); + err = TestStep6ThReadsAcceptedCommandListAttributeFromDut_9(); break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : 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_14(); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_10(); break; } @@ -80501,18 +80519,6 @@ class Test_TC_MOD_1_1 : 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; - 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. @@ -80526,7 +80532,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -80551,7 +80557,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"); @@ -80559,7 +80565,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)); @@ -80575,7 +80581,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"); @@ -80583,7 +80589,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)); @@ -80700,29 +80706,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4dThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aThReadsAcceptedCommandListAttributeFromDut_11() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80730,7 +80714,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 6a: TH reads AcceptedCommandList attribute from DUT Error: %@", err); + NSLog(@"Step 6: TH reads AcceptedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80743,18 +80727,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aThReadsGeneratedCommandListAttributeFromDut_13() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -80762,7 +80735,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 7a: TH reads GeneratedCommandList attribute from DUT Error: %@", err); + NSLog(@"Step 7: TH reads GeneratedCommandList attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -80777,17 +80750,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } }; class OTA_SuccessfulTransfer : public TestCommandBridge { @@ -82182,76 +82144,29 @@ class Test_TC_OO_1_1 : public TestCommandBridge { err = TestStep4bReadTheFeatureDependentOOSF00AttributeInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : 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")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 5: Read the global attribute: EventList\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); - break; + NextTest(); + return; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 5: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_10(); - break; - case 11: ChipLogProgress( - chipTool, " ***** Test Step 11 : Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); + chipTool, " ***** Test Step 10 : Step 6b: Read the feature dependent(OO.S.F00) commands in AcceptedCommandList\n"); if (ShouldSkip("OO.S.F00")) { NextTest(); return; } - err = TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : 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")) { - NextTest(); - return; - } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_10(); break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : 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_14(); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_11(); break; } @@ -82300,15 +82215,6 @@ class Test_TC_OO_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; } // Go on to the next test. @@ -82322,7 +82228,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -82498,29 +82404,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestStep6aReadTheGlobalAttributeAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82543,7 +82427,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_11() + CHIP_ERROR TestStep6bReadTheFeatureDependentOOSF00CommandsInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82566,18 +82450,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_13() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -82585,7 +82458,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -82600,17 +82473,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } }; class Test_TC_OO_2_1 : public TestCommandBridge { @@ -84506,122 +84368,69 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { err = TestStep4bThReadsFromTheDutTheOptionalAttributeCountdownTimeInTheAttributeListFromTheDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Step 4c: 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")) { - NextTest(); - return; - } - err = TestStep4cThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 5a: TH reads from the DUT the EventList attribute.\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: TH reads from the DUT the EventList attribute.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 8: + case 7: ChipLogProgress(chipTool, - " ***** Test Step 8 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); + " ***** Test Step 7 : Step 5b: TH reads from the DUT the optional event(OperationCompletion) in EventList.\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED && OPSTATE.S.E01")) { NextTest(); return; } NextTest(); return; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the optional command(Start) in AcceptedCommandList\n"); + if (ShouldSkip("OPSTATE.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_8(); + break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 5c: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); + if (ShouldSkip("OPSTATE.S.C01.Rsp")) { NextTest(); return; } - err = TestStep5cThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); + err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6a: Read the optional command(Start) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C02")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Pause) in AcceptedCommandList\n"); + if (ShouldSkip("OPSTATE.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_10(); + err = TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6b: Read the optional command(Stop) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C01")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); + if (ShouldSkip("OPSTATE.S.C03.Rsp")) { NextTest(); return; } - err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_11(); + err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6c: Read the optional command(Pause) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C00")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : 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 = TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_12(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6d: Read the optional command(Resume) in AcceptedCommandList\n"); - if (ShouldSkip("OPSTATE.S.C03")) { - NextTest(); - return; - } - err = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 6e: 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 = TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("!OPSTATE.S.C00 || !OPSTATE.S.C01 || !OPSTATE.S.C02 || !OPSTATE.S.C03")) { - NextTest(); - return; - } - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("(OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03)")) { - NextTest(); - return; - } - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : 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")) { + 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 = TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); break; } @@ -84676,18 +84485,6 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { 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. @@ -84701,7 +84498,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -84848,29 +84645,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4cThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5cThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_10() + CHIP_ERROR TestStep6aReadTheOptionalCommandStartInAcceptedCommandList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84892,7 +84667,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_11() + CHIP_ERROR TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84913,7 +84688,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_12() + CHIP_ERROR TestStep6cReadTheOptionalCommandPauseInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84935,7 +84710,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_13() + CHIP_ERROR TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84957,18 +84732,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6eThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_15() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -84976,7 +84740,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -84992,7 +84756,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7aReadTheGlobalAttributeGeneratedCommandList_16() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -85000,7 +84764,7 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -85012,17 +84776,6 @@ class Test_TC_OPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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_PS_1_1 : public TestCommandBridge { @@ -85207,16 +84960,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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep7eReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_19(); - break; } if (CHIP_NO_ERROR != err) { @@ -85285,9 +85028,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. @@ -85301,7 +85041,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; @@ -85634,17 +85374,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 { @@ -86937,58 +86666,20 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { 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")) { + 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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")) { - 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_15(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_14(); break; } @@ -87046,9 +86737,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. @@ -87062,7 +86750,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; @@ -87349,48 +87037,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 - TestStep5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -88312,20 +88008,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { 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")) { - NextTest(); - return; - } - err = TestStep4rThReadsAttributeListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Step 5a: TH reads EventList from DUT\n"); + 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 ")) { @@ -88334,81 +88017,81 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } NextTest(); return; - case 30: + case 29: ChipLogProgress(chipTool, - " ***** Test Step 30 : Step 5b: TH reads from the DUT the EventList optional (SupplyVoltageLow)attribute.\n"); + " ***** 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; } NextTest(); return; - case 31: + case 30: ChipLogProgress(chipTool, - " ***** Test Step 31 : Step 5c: TH reads from the DUT the EventList optional (SupplyVoltageHigh)attribute.\n"); + " ***** 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; } NextTest(); return; - case 32: + case 31: ChipLogProgress(chipTool, - " ***** Test Step 32 : Step 5d: TH reads from the DUT the EventList optional (PowerMissingPhase)attribute.\n"); + " ***** 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; } NextTest(); return; - case 33: + case 32: ChipLogProgress(chipTool, - " ***** Test Step 33 : Step 5e: TH reads from the DUT the EventList optional (SystemPressureLow)attribute.\n"); + " ***** 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; } NextTest(); return; - case 34: + case 33: ChipLogProgress(chipTool, - " ***** Test Step 34 : Step 5f: TH reads from the DUT the EventList optional (SystemPressureHigh)attribute.\n"); + " ***** 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 35: + case 34: ChipLogProgress( - chipTool, " ***** Test Step 35 : Step 5g: TH reads from the DUT the EventList optional (DryRunning)attribute.\n"); + 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 36: + case 35: ChipLogProgress(chipTool, - " ***** Test Step 36 : Step 5h: TH reads from the DUT the EventList optional (MotorTemperatureHigh)attribute.\n"); + " ***** 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; } NextTest(); return; - case 37: + case 36: ChipLogProgress(chipTool, - " ***** Test Step 37 : Step 5i: TH reads from the DUT the EventList optional (PumpMotorFatalFailure)attribute.\n"); + " ***** 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; } NextTest(); return; - case 38: + case 37: ChipLogProgress(chipTool, - " ***** Test Step 38 : Step 5j: TH reads from the DUT the EventList optional " + " ***** 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(); @@ -88416,27 +88099,27 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } NextTest(); return; - case 39: + case 38: ChipLogProgress( - chipTool, " ***** Test Step 39 : Step 5k: TH reads from the DUT the EventList optional (PumpBlocked)attribute.\n"); + 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 40: + case 39: ChipLogProgress(chipTool, - " ***** Test Step 40 : Step 5l: TH reads from the DUT the EventList optional (SensorFailure)attribute.\n"); + " ***** 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; } NextTest(); return; - case 41: + case 40: ChipLogProgress(chipTool, - " ***** Test Step 41 : Step 5m: TH reads from the DUT the EventList optional " + " ***** 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(); @@ -88444,90 +88127,58 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } NextTest(); return; - case 42: + case 41: ChipLogProgress(chipTool, - " ***** Test Step 42 : Step 5n: TH reads from the DUT the EventList optional (ElectronicFatalFailure)attribute.\n"); + " ***** 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 43: + case 42: ChipLogProgress( - chipTool, " ***** Test Step 43 : Step 5o: TH reads from the DUT the EventList optional (GeneralFault)attribute.\n"); + 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; } NextTest(); return; - case 44: + case 43: ChipLogProgress( - chipTool, " ***** Test Step 44 : Step 5p: TH reads from the DUT the EventList optional (Leakage)attribute.\n"); + 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; } NextTest(); return; - case 45: + case 44: ChipLogProgress( - chipTool, " ***** Test Step 45 : Step 5q: TH reads from the DUT the EventList optional (AirDetection)attribute.\n"); + 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 46: + case 45: ChipLogProgress(chipTool, - " ***** Test Step 46 : Step 5r: TH reads from the DUT the EventList optional (TurbineOperation)attribute.\n"); + " ***** 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 from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5sThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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")) { - 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")) { - 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; } @@ -88684,12 +88335,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. @@ -88703,7 +88348,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; @@ -89356,48 +89001,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 - TestStep5sThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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; } }; @@ -91842,6 +91495,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 @@ -91925,15 +91891,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 && PICS_EVENT_LIST_ENABLED")) { + 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) { @@ -92187,17 +92151,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 { @@ -92443,11 +92396,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); @@ -92457,7 +92410,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 @@ -92465,11 +92418,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; } @@ -92482,194 +92435,917 @@ 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; } - err = TestThReadsFromTheDutTheAttributeListAttributeDeviceMuted_9(); - break; + NextTest(); + return; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : TH reads from the DUT the AttributeList attribute(InterconnectSmokeAlarm)\n"); - if (ShouldSkip("SMOKECO.S.A0008")) { + 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 = TestThReadsFromTheDutTheAttributeListAttributeInterconnectSmokeAlarm_10(); + 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_RVCCLEANM_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_RVCCLEANM_3_1() + : TestCommandBridge("Test_TC_RVCCLEANM_3_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("new_mode_th", 0, UINT8_MAX, &mNewModeTh); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_RVCCLEANM_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_RVCCLEANM_3_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_RVCCLEANM_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 11 : TH reads from the DUT the AttributeList attribute(InterconnectCOAlarm)\n"); - if (ShouldSkip("SMOKECO.S.A0009")) { + 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 : Precondition: TH writes from the DUT the OnMode attribute.\n"); + if (ShouldSkip("RVCCLEANM.S.A0003 && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestPreconditionThWritesFromTheDutTheOnModeAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 2: TH reads from the DUT the OnMode attribute.\n"); + if (ShouldSkip("RVCCLEANM.S.A0003 && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep2ThReadsFromTheDutTheOnModeAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("RVCCLEANM.S.A0001 && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep3ThReadsFromTheDutTheCurrentModeAttribute_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 4: TH reads from the DUT the SupportedModes attribute.\n"); + if (ShouldSkip("RVCCLEANM.S.A0000 && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep4ThReadsFromTheDutTheSupportedModesAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Step 5: TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); + if (ShouldSkip("RVCCLEANM.S.C00.Rsp && RVCCLEANM.S.F00")) { NextTest(); return; } - err = TestThReadsFromTheDutTheAttributeListAttributeInterconnectCOAlarm_11(); + err = TestStep5ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6:TH sends a Off command to the DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep6thSendsAOffCommandToTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7:TH sends a On command to the DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep7thSendsAOnCommandToTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 8: TH reads from the DUT the CurrentMode attribute.\n"); + if (ShouldSkip("RVCCLEANM.S.A0001 && RVCCLEANM.S.F00")) { + NextTest(); + return; + } + err = TestStep8ThReadsFromTheDutTheCurrentModeAttribute_8(); + 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; + } + + // 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 = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mNewModeTh; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestPreconditionThWritesFromTheDutTheOnModeAttribute_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onModeArgument; + onModeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOnModeWithValue:onModeArgument + completion:^(NSError * _Nullable err) { + NSLog(@"Precondition: TH writes from the DUT the OnMode attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable on_mode_dut; + + CHIP_ERROR TestStep2ThReadsFromTheDutTheOnModeAttribute_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 2: TH reads from the DUT the OnMode attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onMode", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("onMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("onMode", [value unsignedCharValue], 254U)); + } + { + on_mode_dut = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull old_current_mode_dut; + + CHIP_ERROR TestStep3ThReadsFromTheDutTheCurrentModeAttribute_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [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)); + { + old_current_mode_dut = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThReadsFromTheDutTheSupportedModesAttribute_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 4: TH reads from the DUT the SupportedModes attribute. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("supportedModes", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("supportedModes", value, 2)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep5ThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + params.newMode + = mNewModeTh.HasValue() ? [NSNumber numberWithUnsignedChar:mNewModeTh.Value()] : [NSNumber numberWithUnsignedChar:1U]; + [cluster + changeToModeWithParams:params + completion:^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Step 5: 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)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6thSendsAOffCommandToTheDut_6() + { + + 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 6:TH sends a Off command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7thSendsAOnCommandToTheDut_7() + { + + 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 7:TH sends a On command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep8ThReadsFromTheDutTheCurrentModeAttribute_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [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)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentMode", actualValue, on_mode_dut)); + } + + 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 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : TH reads from the DUT the AttributeList attribute(ContaminationState)\n"); - if (ShouldSkip("SMOKECO.S.A000a")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutTheAttributeListAttributeContaminationState_12(); + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads the ClusterRevision attribute from the DUT\n"); + err = TestStep2ThReadsTheClusterRevisionAttributeFromTheDut_1(); break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : TH reads from the DUT the AttributeList attribute(SmokeSensitivityLevel)\n"); - if (ShouldSkip("SMOKECO.S.A000b")) { + 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 = TestThReadsFromTheDutTheAttributeListAttributeSmokeSensitivityLevel_13(); + err = TestStep3aThReadsTheFeatureMapAttributeFromTheDut_2(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads from the DUT the AttributeList attribute(ExpiryDate)\n"); - if (ShouldSkip("SMOKECO.S.A000c")) { + 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 = TestThReadsFromTheDutTheAttributeListAttributeExpiryDate_14(); + err = TestStep3bGivenRvcrunmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads from the DUT the EventList attribute\n"); + 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; } - 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")) { + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_4(); + break; + 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; } - 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")) { + err = TestStep4aThReadsTheAttributeListAttributeFromTheDut_5(); + break; + 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; } - 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")) { + err = TestStep4bThReadsTheOptionalAttributeStartUpModeInAttributeListFromTheDut_6(); + break; + 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; } @@ -92718,45 +93394,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. @@ -92770,14 +93407,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; @@ -92785,15 +93422,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)); @@ -92809,15 +93446,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)); @@ -92833,71 +93470,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(); }]; @@ -92905,24 +93489,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(); }]; @@ -92930,20 +93517,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(); }]; @@ -92951,15 +93544,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)); @@ -92972,104 +93565,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(); }]; @@ -93077,20 +93588,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(); }]; @@ -93098,21 +93611,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")); @@ -93122,42 +93637,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")); @@ -93168,11 +93665,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); @@ -93182,7 +93679,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 @@ -93190,11 +93687,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; } @@ -93207,112 +93704,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; } @@ -93387,7 +93879,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; @@ -93395,65 +93887,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(); }]; @@ -93461,21 +93972,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(); }]; @@ -93483,21 +94004,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(); }]; @@ -93505,59 +94029,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(); }]; @@ -93565,21 +94077,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(); }]; @@ -93587,21 +94100,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(); }]; @@ -93609,63 +94124,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(); }]; @@ -93673,38 +94174,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 @@ -93712,11 +94196,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; } @@ -93729,337 +94213,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; } @@ -94147,82 +94493,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; @@ -94230,716 +94521,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(); - } - 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(CheckValue("ClusterRevision", actualValue, 1U)); + } + + 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"); @@ -94947,343 +95144,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(); }]; @@ -95854,11 +95977,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); @@ -95868,7 +95991,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 @@ -95876,11 +95999,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; } @@ -95897,104 +96020,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"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + 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; } - NextTest(); - return; + err = TestStep4bThReadsFromTheDutTheAttributeListAttribute0x0002ShallBeIncludedIfAndOnlyIfTCCMSA0002StartUpMode_6(); + break; case 7: 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 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: - 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")) { + 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 = TestStep6aReadTheOptionalCommandPauseInAcceptedCommandList_8(); + err = TestStep3aThReadsFromTheDutTheFeatureMapAttribute_2(); 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")) { + case 3: + ChipLogProgress(chipTool, + " ***** 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; } - err = TestStep6bReadTheOptionalCommandStopInAcceptedCommandList_9(); + err = TestStep3bThReadsFromTheDutTheFeatureMapAttributeBit0ShallBe1IfAndOnlyIfTctlsf00tntctlsf01tl_3(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 6c: Read the optional command(Start) in AcceptedCommandList\n"); - if (ShouldSkip("RVCOPSTATE.S.C02.Rsp")) { + 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 = TestStep6cReadTheOptionalCommandStartInAcceptedCommandList_10(); + err = TestStep3cThReadsFromTheDutTheFeatureMapAttributeBit1ShallBe1IfAndOnlyIfTctlsf01tltctlsf00tn_4(); 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")) { + 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 = TestStep6dReadTheOptionalCommandResumeInAcceptedCommandList_11(); + err = TestStep3dThReadsFromTheDutTheFeatureMapAttributeBit2ShallBe1IfAndOnlyIfTctlsf02aStepTctlsf00tn_5(); 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 ")) { + 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 = TestStep7ReadTheGlobalAttributeGeneratedCommandList_12(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_6(); break; - case 13: - 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 ")) { + 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 = TestStep7ReadTheGlobalAttributeGeneratedCommandList_13(); + err = TestStep4aThReadsFromTheDutTheAttributeListAttribute_7(); + break; + case 8: + 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 = TestStep4bThReadsFromTheDutTheAttributeListAttribute0x00000x00010x0002ShallBeIncludedIfAndOnlyIfTctlsf00tn_8(); + break; + case 9: + 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 = TestStep4cThReadsFromTheDutTheAttributeListAttribute0x0003ShallBeIncludedIfAndOnlyIfTctlsf02aStep_9(); + break; + case 10: + 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 = TestStep4dThReadsFromTheDutTheAttributeListAttribute0x00040x0005ShallBeIncludedIfAndOnlyIfTctlsf01tl_10(); + break; + case 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 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; + } + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -96076,17 +96634,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)); @@ -96102,17 +96660,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)); @@ -96128,61 +96686,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)); @@ -96193,24 +96783,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(); }]; @@ -96218,23 +96810,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(); }]; @@ -96242,23 +96837,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(); }]; @@ -96266,22 +96862,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(); }]; @@ -96289,23 +96888,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(); }]; @@ -96313,17 +96911,17 @@ 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)); @@ -96338,29 +96936,6 @@ class Test_TC_RVCOPSTATE_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState 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)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 4UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; class Test_TC_TMP_1_1 : public TestCommandBridge { @@ -96446,15 +97021,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 && PICS_EVENT_LIST_ENABLED")) { + 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) { @@ -96708,17 +97281,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 { @@ -97007,10 +97569,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: @@ -97506,15 +98064,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 && PICS_EVENT_LIST_ENABLED")) { + 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) { @@ -97734,11 +98290,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() @@ -98937,17 +99507,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 { @@ -99017,65 +99576,21 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { err = TestStep4ReadTheGlobalAttributeAttributeList_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")) { - NextTest(); - return; - } - err = TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 5: Read the global attribute: AcceptedCommandList\n"); + err = TestStep5ReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 5a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep5aReadTheGlobalAttributeAcceptedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 6: Read the global attribute: GeneratedCommandList\n"); + err = TestStep6ReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Step 5b: Read the global attribute: AcceptedCommandList. 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 = TestStep5bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 6a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeGeneratedCommandList_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Step 6b: Read the global attribute: GeneratedCommandList. 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 = TestStep6bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : 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 && PICS_EVENT_LIST_ENABLED")) { + 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_10(); - break; + NextTest(); + return; } if (CHIP_NO_ERROR != err) { @@ -99111,15 +99626,6 @@ class Test_TC_TSUIC_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. @@ -99133,7 +99639,7 @@ class Test_TC_TSUIC_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; @@ -99261,18 +99767,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4bReadTheGlobalAttributeAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep5aReadTheGlobalAttributeAcceptedCommandList_6() + CHIP_ERROR TestStep5ReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99282,7 +99777,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 5a: Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Step 5: Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99298,18 +99793,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep5bReadTheGlobalAttributeAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestStep6ReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -99319,7 +99803,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 6a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 6: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -99334,28 +99818,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep6bReadTheGlobalAttributeGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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); - } - - CHIP_ERROR - TestStep7ReadEventListAttributeFromTheDUTForThisClusterTheListIsUsuallyEmptyButItCanContainManufacturerSpecificEventIDs_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_TSUIC_2_1 : public TestCommandBridge { @@ -100984,64 +101446,24 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { NextTest(); return; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : Step 5d: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5dThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : 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_19(); + err = TestStep6ThReadsAcceptedCommandListFromDut_18(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGTHREAD.S.F01")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, - " ***** Test Step 21 : Step 6c: 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 = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Step 7a: TH reads GeneratedCommandList from DUT\n"); - err = TestStep7aThReadsGeneratedCommandListFromDut_22(); + err = TestStep6ThReadsAcceptedCommandListFromDut_19(); break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : 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_23(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_20(); break; } @@ -101117,15 +101539,6 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -101139,7 +101552,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 24; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -101557,18 +101970,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep5dThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aThReadsAcceptedCommandListFromDut_19() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101578,7 +101980,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)); @@ -101594,7 +101996,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bThReadsAcceptedCommandListFromDut_20() + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101604,7 +102006,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)); @@ -101617,18 +102019,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aThReadsGeneratedCommandListFromDut_22() + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -101638,7 +102029,7 @@ class Test_TC_DGTHREAD_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)); @@ -101653,17 +102044,6 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_23() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_TIMESYNC_1_1 : public TestCommandBridge { @@ -101881,172 +102261,116 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { err = TestTs4CheckForTscFeatureBasedAttributesNotInAttributeList_21(); break; case 22: - ChipLogProgress(chipTool, - " ***** Test Step 22 : TS4: Check for mandatory attributes in 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")) { - NextTest(); - return; - } - err = TestTs4CheckForMandatoryAttributesInAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TS5: Check for mandatory events in EventList\n"); + ChipLogProgress(chipTool, " ***** Test Step 22 : TS5: Check for mandatory events in EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TS5: Check for TZ feature-based events in EventList\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TS5: Check for TZ feature-based events in EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F00")) { NextTest(); return; } NextTest(); return; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TS5: Check for TZ feature-based events not in EventList\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TS5: Check for TZ feature-based events not in EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F00")) { NextTest(); return; } NextTest(); return; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TS5: Check for TSC feature-based events in EventList\n"); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TS5: Check for TSC feature-based events in EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED && TIMESYNC.S.F03")) { NextTest(); return; } NextTest(); return; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TS5: Check for TSC feature-based events not in EventList\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TS5: Check for TSC feature-based events not in EventList\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED && !TIMESYNC.S.F03")) { NextTest(); return; } NextTest(); return; - case 28: - ChipLogProgress(chipTool, - " ***** Test Step 28 : TS5: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestTs5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TS6: Check for mandatory commands in AcceptedCommandList\n"); - err = TestTs6CheckForMandatoryCommandsInAcceptedCommandList_29(); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TS6: Check for mandatory commands in AcceptedCommandList\n"); + err = TestTs6CheckForMandatoryCommandsInAcceptedCommandList_27(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TS6: Check for TZ feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_30(); + err = TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_28(); break; - case 31: + case 29: ChipLogProgress( - chipTool, " ***** Test Step 31 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 29 : TS6: Check for TZ feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_31(); + err = TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_29(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TS6: Check for NTPC feature-based commands in AcceptedCommandList\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TS6: Check for NTPC feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_32(); + err = TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_30(); break; - case 33: + case 31: ChipLogProgress( - chipTool, " ***** Test Step 33 : TS6: Check for NTPC feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 31 : TS6: Check for NTPC feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F01")) { NextTest(); return; } - err = TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_33(); + err = TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_31(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TS6: Check for TSC feature-based commands in AcceptedCommandList\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : TS6: Check for TSC feature-based commands in AcceptedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F03")) { NextTest(); return; } - err = TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_34(); + err = TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_32(); break; - case 35: + case 33: ChipLogProgress( - chipTool, " ***** Test Step 35 : TS6: Check for TSC feature-based commands in not AcceptedCommandList\n"); + chipTool, " ***** Test Step 33 : TS6: Check for TSC feature-based commands in not AcceptedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F03")) { NextTest(); return; } - err = TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_35(); - break; - case 36: - ChipLogProgress(chipTool, - " ***** Test Step 36 : TS6: Check for mandatory commands in AcceptedCommandList. 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 = TestTs6CheckForMandatoryCommandsInAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_36(); + err = TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_33(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TS7: Check for TZ feature-based commands in GeneratedCommandList\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TS7: Check for TZ feature-based commands in GeneratedCommandList\n"); if (ShouldSkip("TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_37(); + err = TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_34(); break; - case 38: + case 35: ChipLogProgress( - chipTool, " ***** Test Step 38 : TS7: Check for TZ feature-based commands in not GeneratedCommandList\n"); + chipTool, " ***** Test Step 35 : TS7: Check for TZ feature-based commands in not GeneratedCommandList\n"); if (ShouldSkip("!TIMESYNC.S.F00")) { NextTest(); return; } - err = TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_38(); - break; - case 39: - ChipLogProgress(chipTool, - " ***** Test Step 39 : TS7: Check for mandatory commands in GeneratedCommandList. 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 = TestTs7CheckForMandatoryCommandsInGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_39(); + err = TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_35(); break; } @@ -102167,18 +102491,6 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { 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; } // Go on to the next test. @@ -102192,7 +102504,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 40; + const uint16_t mTestCount = 36; chip::Optional mNodeId; chip::Optional mCluster; @@ -102689,29 +103001,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestTs4CheckForMandatoryAttributesInAttributeList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_22() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 - TestTs5ThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_28() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestTs6CheckForMandatoryCommandsInAcceptedCommandList_29() + CHIP_ERROR TestTs6CheckForMandatoryCommandsInAcceptedCommandList_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102733,7 +103023,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_30() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInAcceptedCommandList_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102756,7 +103046,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_31() + CHIP_ERROR TestTs6CheckForTzFeatureBasedCommandsInNotAcceptedCommandList_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102779,7 +103069,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_32() + CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInAcceptedCommandList_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102801,7 +103091,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_33() + CHIP_ERROR TestTs6CheckForNtpcFeatureBasedCommandsInNotAcceptedCommandList_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102823,7 +103113,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_34() + CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInAcceptedCommandList_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102845,7 +103135,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_35() + CHIP_ERROR TestTs6CheckForTscFeatureBasedCommandsInNotAcceptedCommandList_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102867,18 +103157,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestTs6CheckForMandatoryCommandsInAcceptedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_36() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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 TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_37() + CHIP_ERROR TestTs7CheckForTzFeatureBasedCommandsInGeneratedCommandList_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102900,7 +103179,7 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_38() + CHIP_ERROR TestTs7CheckForTzFeatureBasedCommandsInNotGeneratedCommandList_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -102921,17 +103200,6 @@ class Test_TC_TIMESYNC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestTs7CheckForMandatoryCommandsInGeneratedCommandList1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_39() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for 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_TIMESYNC_2_3 : public TestCommandBridge { @@ -103265,81 +103533,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"); - 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"); + err = TestStep3ThReadsFromTheDutTheFeatureMapAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4a: Read the global attribute: AttributeList\n"); + 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"); + 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")) { + 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 && PICS_EVENT_LIST_ENABLED")) { - 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")) { - 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")) { - NextTest(); - return; - } - err = TestStep7ReadTheGlobalAttributeGeneratedCommandList1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_8(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 7: TH reads GeneratedCommandList attribute from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListAttributeFromDut_7(); break; } @@ -103376,9 +103607,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. @@ -103392,7 +103620,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; @@ -103407,7 +103635,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"); @@ -103415,7 +103643,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)); @@ -103431,7 +103659,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"); @@ -103439,7 +103667,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)); @@ -103455,7 +103683,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"); @@ -103463,7 +103691,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)); @@ -103482,7 +103710,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"); @@ -103490,7 +103718,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)); @@ -103508,48 +103736,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; } }; @@ -108617,55 +108849,57 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { 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")) { + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } err = TestStep3aThReadsOperationalStatusAttributesBit01_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")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : Step 3a: 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 = TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_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 3a: 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 = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_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 3a: 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 = TestStep3aThCheckOperationalStatusValueBit23Wncvsf00lf_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")) { + chipTool, " ***** Test Step 18 : Step 3a: 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 = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress( + chipTool, " ***** Test Step 19 : Step 3a: 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 = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); @@ -109155,6 +109389,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { value.ms = 2000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull OperationalStatusValue; CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() { @@ -109169,96 +109404,133 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { 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 TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_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 2..3 (WNCV.S.F00(LF)) Error: %@", err); + id bitmap8Argument; + bitmap8Argument = [OperationalStatusValue copy]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: 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 TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_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 2..3 (WNCV.S.F00(LF)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: 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 TestStep3aThCheckOperationalStatusValueBit23Wncvsf00lf_17() { 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 3a: 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 TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18() { 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 3a: 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 TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_19() { - 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 3a: 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() @@ -109627,55 +109899,57 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { 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")) { + if (ShouldSkip("WNCV.S.A000a")) { NextTest(); return; } err = TestStep3aThReadsOperationalStatusAttributesBit01_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")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : Step 3a: 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 = TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_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 3a: 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 = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_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 3a: TH checks OperationalStatus value bit 2..3 (WNCV.S.F00(LF))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F00")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributesBit45Wncvsf01tl_17(); + err = TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_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")) { + chipTool, " ***** Test Step 18 : Step 3a: 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 = TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 3a: TH reads OperationalStatus attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress( + chipTool, " ***** Test Step 19 : Step 3a: TH chesks OperationalStatus value bit 4..5 (WNCV.S.F01(TL))\n"); + if (ShouldSkip("WNCV.S.A000a && !WNCV.S.F01")) { NextTest(); return; } - err = TestStep3aThReadsOperationalStatusAttributeFromDut_19(); + err = TestStep3aThChesksOperationalStatusValueBit45Wncvsf01tl_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Step 3a2: DUT updates its attributes\n"); @@ -110165,6 +110439,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { value.ms = 2000UL; return WaitForMs("alpha", value); } + NSNumber * _Nonnull OperationalStatusValue; CHIP_ERROR TestStep3aThReadsOperationalStatusAttributesBit01_14() { @@ -110179,96 +110454,133 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { 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 TestStep3aWriteAttributeBitmap8WithOperationalStatusValueToDoTheBitsChecksInUpcomingOperationalStatusReadSteps_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 2..3 (WNCV.S.F00(LF)) Error: %@", err); + id bitmap8Argument; + bitmap8Argument = [OperationalStatusValue copy]; + [cluster writeAttributeBitmap8WithValue:bitmap8Argument + completion:^(NSError * _Nullable err) { + NSLog(@"Step 3a: 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 TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_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 2..3 (WNCV.S.F00(LF)) Error: %@", err); + [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Step 3a: 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 TestStep3aThChecksOperationalStatusValueBit23Wncvsf00lf_17() { 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 3a: 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 TestStep3aThChecksOperationalStatusValueBit45Wncvsf01tl_18() { 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 3a: 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 TestStep3aThChesksOperationalStatusValueBit45Wncvsf01tl_19() { - 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 3a: 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() @@ -140832,6 +141144,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) { @@ -140858,6 +141182,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. @@ -140871,7 +141204,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; @@ -140929,7 +141262,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)); @@ -140940,24 +141273,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(); @@ -141014,6 +141348,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 { @@ -154347,91 +154755,40 @@ class Test_TC_DGSW_1_1 : public TestCommandBridge { 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")) { - NextTest(); - return; - } - err = TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5a: TH reads EventList from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 5a: 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"); + case 11: + 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 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Step 5c: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5cThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6a: TH reads AcceptedCommandList from DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip("DGSW.S.F00")) { NextTest(); return; } - err = TestStep6aThReadsAcceptedCommandListFromDut_14(); + err = TestStep6ThReadsAcceptedCommandListFromDut_12(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6b: TH reads AcceptedCommandList from DUT\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: TH reads AcceptedCommandList from DUT\n"); if (ShouldSkip(" !DGSW.S.F00 ")) { 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")) { - NextTest(); - return; - } - err = TestStep6cThReadsAcceptedCommandListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x000000ff2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestStep6ThReadsAcceptedCommandListFromDut_13(); 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")) { - NextTest(); - return; - } - err = TestStep7ThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 7: TH reads GeneratedCommandList from DUT\n"); + err = TestStep7ThReadsGeneratedCommandListFromDut_14(); break; } @@ -154489,15 +154846,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. @@ -154511,7 +154859,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; @@ -154746,29 +155094,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 - TestStep5cThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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"); @@ -154778,7 +155104,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)); @@ -154791,7 +155117,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"); @@ -154801,7 +155127,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)); @@ -154817,26 +155143,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; } }; @@ -176744,91 +177074,33 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { err = TestStep4eReadTheOptionalAttributeReplacementProductListAcfremonsf02InAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : 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")) { - NextTest(); - return; - } - err = TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6a: Read the global attribute: AcceptedCommandList\n"); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("!ACFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_15(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 16: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 16 : Step 6a: 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 = TestStep6aReadTheOptionalCommandResetConditionInAcceptedCommandList_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : Step 6b: TH reads from the DUT the AcceptedCommandList attribute. 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")) { - NextTest(); - return; - } - err = TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_17(); + err = TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : Step 7b: TH reads from the DUT the GeneratedCommandList attribute. 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")) { - NextTest(); - return; - } - err = TestStep7bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_19(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -176889,18 +177161,6 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { 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. @@ -176914,7 +177174,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -177196,29 +177456,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4fThReadsAttributeListAttributeFromDut1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aReadTheGlobalAttributeAcceptedCommandList_15() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177228,7 +177466,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 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)); @@ -177244,7 +177482,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadTheOptionalCommandResetConditionInAcceptedCommandList_16() + CHIP_ERROR TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177254,7 +177492,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 6a: 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)); @@ -177267,18 +177505,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsFromTheDutTheAcceptedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep7aReadTheGlobalAttributeGeneratedCommandList_18() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177288,7 +177515,7 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -177303,17 +177530,6 @@ class Test_TC_ACFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsFromTheDutTheGeneratedCommandListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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_ACFREMON_2_1 : public TestCommandBridge { @@ -177744,83 +177960,33 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { err = TestStep4eReadTheOptionalAttributeReplacementProductListHepafremonsf02InAttributeList_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Step 4f: TH reads from the DUT the AttributeList attribute. 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 = TestStep4fThReadsFromTheDutTheAttributeListAttributeTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 5a: TH reads EventList attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 5: TH reads EventList attribute from DUT\n"); if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : Step 5b: TH reads from the DUT the EventList attribute. 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 && PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - err = TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6a: Read the global attribute: AcceptedCommandList\n"); - err = TestStep6aReadTheGlobalAttributeAcceptedCommandList_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : 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")) { + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6: Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("!HEPAFREMON.S.C00.Rsp")) { NextTest(); return; } - err = TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_16(); + err = TestStep6ReadTheGlobalAttributeAcceptedCommandList_13(); break; - case 17: + case 14: ChipLogProgress( - chipTool, " ***** Test Step 17 : 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_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 7a: Read the global attribute: GeneratedCommandList\n"); - err = TestStep7aReadTheGlobalAttributeGeneratedCommandList_18(); + err = TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14(); break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : 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_19(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 7: Read the global attribute: GeneratedCommandList\n"); + err = TestStep7ReadTheGlobalAttributeGeneratedCommandList_15(); break; } @@ -177881,18 +178047,6 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { 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. @@ -177906,7 +178060,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; @@ -178189,29 +178343,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep4fThReadsFromTheDutTheAttributeListAttributeTheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TTheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 - TestStep5bThReadsFromTheDutTheEventListAttribute1TheListShallNotContainAnyAdditionalValuesInTheStandardOrScopedRange0x000000000x00004fffAnd0x0000F0000x0000Fffe2TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX4fffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored3TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000050000x0000EfffAnd0x0000Ffff0xXXXX50000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6aReadTheGlobalAttributeAcceptedCommandList_15() + CHIP_ERROR TestStep6ReadTheGlobalAttributeAcceptedCommandList_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178221,10 +178353,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(); }]; @@ -178232,18 +178369,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestStep6bThReadsAcceptedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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 TestStep6bReadTheOptionalCommandResetConditionInAcceptedCommandList_17() + CHIP_ERROR TestStep6ReadTheOptionalCommandResetConditionInAcceptedCommandList_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178253,7 +178379,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)); @@ -178266,7 +178392,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7aReadTheGlobalAttributeGeneratedCommandList_18() + CHIP_ERROR TestStep7ReadTheGlobalAttributeGeneratedCommandList_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178276,7 +178402,7 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Step 7a: Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"Step 7: Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -178291,17 +178417,6 @@ class Test_TC_HEPAFREMON_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestStep7bThReadsGeneratedCommandListAttributeFromDut1TheListMayContainValuesInTheManufacturerExtensibleIdentifierMeiRange0xXXXX00000xXXXX00ffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1TheseValuesShallBeIgnored2TheListShallNotContainAnyValuesInTheTestVendorOrInvalidRange0x000001000x0000Ffff0xXXXX01000xXXXXFfffAnd0xFFF100000xFFFFFfffWhereXxxxIsTheAllowedMeiRange0x00010xFFF1_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_HEPAFREMON_2_1 : public TestCommandBridge { @@ -178671,17 +178786,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(), @@ -178701,6 +178814,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -178759,13 +178875,18 @@ 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(), make_unique(),